top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration Why to Join

Facebook Login
Site Registration

What are the different types of exchange supported by RabbitMQ and why those are required ?

+1 vote
26 views
What are the different types of exchange supported by RabbitMQ and why those are required ?
posted Jan 28, 2017 by Neelam

Share this question
Facebook Share Button Twitter Share Button Google+ Share Button LinkedIn Share Button Multiple Social Share Button

1 Answer

0 votes

RabbitMQ is a kind of AMQP (Advanced Messaging Queuing Protocol) which is used for inter process communication. RabbitMQ is better than normal linux message queue mechanism. RabbitMQ uses publisher/producer and consumer same as normal queuing mechanism but it also support various concepts such as broker/exchange and bindings.
Mainly four types of exchanges have been defined as following:

  1. Direct Exchange : In this case publisher/producer sends a message to exchange with the key "K" and if a queue binds to the exchange with routing key "K" then the message is routed to the queue. This kind of exchange is useful in case of unicasting.

  2. Fanout Exchange: In this case, when a message is published to exchange then copy of message is delivered to all the bounded queues ignoring the key. Mainly it is used for broadcasting the message to all the consumers.

  3. Topic Exchange: In this case, a message produced by a producer can be routed to multiple queues based on the pattern used while binding queue with exchange. It is kind of multi-casting.

  4. Header Exchange: In case of header exchange, message is routed to different queues based on the message attributes rather than using routing key.

This is all about exchange/broker what I know in the context of AMQP.

answer Jan 28, 2017 by Harshita
Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Bangalore-560102
Karnataka INDIA.
QUERY HOME
...