This is a simple example of a queue system using Queue and Redis.
First start a Redis server on your local machine.
docker run -d -p 6379:6379 redis
Then install the dependencies:
cd /poc-consumer
npm install
cd /poc-producer
npm install
cd /poc-producer
npm start
cd /poc-consumer
npm start
Method | Endpoint | Description |
---|---|---|
GET | /pull | Send a message to the queue. |
Please note that the consumer will only process messages that are available in the queue.