Skip to content

Vaviloff/exp-rabbitmq-nodejs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

exp-rabbitmq-nodejs

Run a local Docker container:

docker run -it --rm --name rabbitmq -p 5672:5672 -p 15672:15672 rabbitmq:3-management

Port explanation:

5672 used by AMQP 0-9-1 protocol and 1.0 clients without and with TLS
15672 used by HTTP API clients, management UI and rabbitmqadmin (only if the management plugin is enabled)

  • Queues store messages to be consumed.
  • Messages are sent into Exchanges, which take a message and route it into zero or more queues.
  • Bindings connect exchanges to queues.

Install

yarn

Run in different terminals:

node consumer.js

/usr/bin/watch -n1 node producer.js

Example of retrying a failed task (consumer MUST nack the message):

node deadletter.js

Note: RabbitMQ web interface is available at http://localhost:15672/#/queues

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published