RabbitMQ exchanges
RabbitMQ is versatile and provides for a variety of exchanges which are at the disposal of its developers to cater to a myriad of problems that come across for implementation.
Direct exchanges
In this type of exchange, we have a routing key bound to the queue, which serves as a pass key to direct the messages to the queue. So every message that is published to the exchange has a routing key associated with it, which decides the destination queue the exchange writes it to. For example, in the preceding figure, the message is written to the green queue because the message routing queue "green" binds to the green queue:
Fanout exchanges
They can also be called broadcast exchange, because when a message is published to a Fanout Exchange it's written/sent to all the queues bound to the exchange. The preceding figure demonstrates its working. Here the message published by the producer is sent to all the three queues; green, red, and orange. So in a nutshell each queue bound to the...