Skip to content

simple rabbitmq-nodejs to connect to amqp and to send/receive messages

License

Notifications You must be signed in to change notification settings

hovig/rabbitmq-nodejs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rabbitmq-nodejs

simple rabbitmq-nodejs to connect to amqp and to send/receive messages

rabbitmq architecture explained

A node.js based dockerized application that connects to amqp and serves as an api to pass/send a message through publish api and puts it in the queue under a queue name that the subscribe api receives it.

Make sure rabbitmq-server is downloaded. Run rabbitmq-server start.

To run the application:

There are multiple ways to do that:

  • A - As node.js app
  1. git clone https://github.com/hovig/rabbitmq-nodejs.git
  2. npm install
  3. npm start
  • B - As a docker
  1. docker pull hovig/rabbitmq-nodejs
  2. docker run hovig/rabbitmq-nodejs
  • C - As a docker on your local machine

What to expect when you run the messaging broker:

To send a message and push it to the queue:

https://localhost:5000/publish/{"fitcoins":10, "steps":20}

To receive message from the queue:

https://localhost:5000/subscribe

Output:

About

simple rabbitmq-nodejs to connect to amqp and to send/receive messages

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published