What is Exchange & Queue and Consumer in RabbitMQ ?

Before we understand exchange and queue technically lets take real time example.

Say you want to purchase mobile and you went to one shop which is selling electrical items and you went there but you do not know where is mobile department.

Now one person comes to you and asks you How can I help you sir ?
Obviously you say that I want to purchase mobile and then that person will guide you to mobile department. So basically that person gives you direction.

So here that person who guides you is exchange and mobile department is queue. The person who will serve you at mobile department is called consumer.

So exchange is required when you do not know from where to route your message.

If you want to learn more about RabbitMQ and its practical implementation with Java, Spring Boot and Spring MVC then just CLICK HERE

Lets understand it by images.




--------------------------------------------------------------------------------------------------------------------------