NestJS Producer and Consumer modules based on the NATS JestStream.
npm i
npm test
Start Nats local server first
docker run --name nats-main -p 4222:4222 -p 6222:6222 -p 8222:8222 nats -js -V
Run application
npm run start:dev
Publish 1000 messages and process them
curl http://localhost:3000/start
Stop publish process
curl http://localhost:3000/stop
Publish messages
curl http://localhost:3000/publish
Pull messages
curl http://localhost:3000/pull
Clean up
docker container rm nats-main