Sample flow to send and recieve message from a rabbitmq server

Uses the node-red-contrib-amqp node to send and listen to messages published to a queue in RabbitMQ and display it in debug output.

Install node-red https://nodered.org/docs/getting-started/installation Install node-red-contrib-amqp https://www.npmjs.com/package/node-red-contrib-amqp Install RabbitMQ https://www.rabbitmq.com/download.html

start the rabbitmq server.

if you click on the inject node you can see that message is being sent to rabbitmq and listen to the rabbitmq and shows in the debug window.

You can send any type of data in the inject node by adjusting the input please note that the queue name in both input and output node must be same.

[{"id":"a2c0fe79.167fe8","type":"amqp in","z":"31021ae3.1b765e","name":"","topic":"","iotype":"4","ioname":"new_test","server":"1dde2dd.ec1ec52","x":137.5,"y":255,"wires":[["88eed72c.68c1f"]]},{"id":"1dde2dd.ec1ec52","type":"amqp-server","z":"","host":"localhost","port":"5672","vhost":"","keepalive":"30","usetls":false,"verifyservercert":true,"usetopology":false,"topology":"{\n\t\"exchanges\": [\n\t\t{\"name\": \"exchange1\", \"type\": \"direct\", \"options\": {\"durable\": false}},\n\t\t{\"name\": \"exchange2\"}\n\t],\n\t\"queues\": [\n\t\t{\"name\": \"queue1\", \"options\": {\"messageTtl\": 60000}},\n\t\t{\"name\": \"queue2\"}\n\t],\n\t\"bindings\": [\n\t\t{\"source\": \"exchange1\", \"queue\": \"queue1\", \"pattern\": \"debug\", \"args\": {}},\n\t\t{\"source\": \"exchange1\", \"exchange\": \"exchange2\", \"pattern\": \"error\"},\n\t\t{\"source\": \"exchange2\", \"queue\": \"queue2\"}\n\t]\n}"}]
alameenkh7

Flow Info

created 2 weeks, 2 days ago

Node Types

Other
  • amqp in (x1)
  • amqp-server (x1)

Tags

  • Rabbitmq
  • Amqp
Copy this flow JSON to your clipboard and then import into Node-RED using the Import From > Clipboard (Ctrl-I) menu option