Example sending emails usage of RabbitMQ on Node.js.
Needed Docker.
Pull rabbitmq Image.
docker pull rabbitmq
Run RabbitMQ and bind to localport 5672 and 15672.
docker run -d --name myrabbit -p 5672:5672 -p 15672:15672 rabbitmq
Get packages.
npm install
Run consumer script to send email.
npm run consumer
Run producer script to add emails to RabbitMQ queue.
npm run producer