Chapter 8. Cross-cluster message distribution
This chapter covers
- Federated exchanges and queues
- How to set up multiple federated RabbitMQ nodes in Amazon Web Services
- Different patterns of use for RabbitMQ federation
Whether you’re looking to implement messaging across data centers, upgrade RabbitMQ, or provide transparent access to messages in different RabbitMQ clusters, you’ll want to take a look at the federation plugin. Distributed with RabbitMQ as a stock plugin, the federation plugin provides two different ways to get messages from one cluster to another. By using a federated exchange, messages published to an exchange in another RabbitMQ server or cluster are automatically routed to bound exchanges and queues on the downstream host. Alternatively, if your needs are more specific, federated queues provide a way to target the messages in a single queue instead of an exchange. In either scenario, the goal is to transparently relay messages from the upstream node where they were originally published to the downstream node (figure 8.1).