visit
Work Queues setup in RabbitMQ
RabbitMQ, and messaging in general, uses some jargon.Producing means nothing more than sending. A program that sends messages is a producer
A queue is the name for a post box which lives inside RabbitMQ. Although messages flow through RabbitMQ and your applications, they can only be stored inside a queue. A queue is only bound by the host’s memory & disk limits, it’s essentially a large message buffer. Many producers can send messages that go to one queue, and many consumers can try to receive data from one queue.
Consuming has a similar meaning to receiving. A consumer is a program that mostly waits to receive messages:
Step 1 : Installing Rabbit MQ on local machine.
Install Rabbit MQ on local server. Please go through the below url for installation.After starting Rabbit MQ server create an instance .
Once you create an instance, click on the “RabbitMQ Manager” button.
Step 1 : Installing Rabbit MQ on local machine.
Install Rabbit MQ on local server. Please go through the below url for installation.After starting Rabbit MQ server create an instance .
Once you create an instance, click on the “RabbitMQ Manager” button.
We can also create a queue from code. The queue should be ready in seconds.
Step 2: Writing Node js application for Rabbit MQ
Index.js
Here goes the core part of sending the message to queue. Express framework is used for routing the API for posting the data from postman. Queue's are published to publishqueue funtion in MQService.MQSevice.js
Here rabbitMQ connection and channels are created, using amqp. Publishe d queue's are consumed and acknowledged.