With the new feature request in hand, the CC programming team came up with the new overall messaging architecture shown in the following diagram. The back-office application will be connected to RabbitMQ in order to publish information messages to all taxi drivers:
![](https://static.packt-cdn.com/products/9781789131666/graphics/assets/966ed4da-f77c-4c89-acee-32a1e47dd8a6.png)
To roll this out, one way could be to use the topic messaging that's already in place and create a special topic to which all drivers would be subscribed. However, there is an even cleaner and simpler approach offered by the AMQP protocol – fanout exchange.
Fanout exchange
Fanout exchange takes all messages that are coming in and delivers them to all queues that are bound to it. An easy-to-understand example of where to use a fanout is when messages need to be spread between many participants, like in a chat (however, there are probably better choices for pure chat applications).
Other examples include the following:
- Score board or...