O'Reilly logo

RabbitMQ Cookbook by Sigismondo Boschi, Gabriele Santomaggio

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Distributing messages between a couple of brokers

The ha-mirror plugin requires a cluster. As we have seen in Chapter 6, Developing Scalable Applications, it does not tolerate network partitions well.

In order to replicate messages across the WAN, you can use the federation plugin. This plugin does not require a cluster, so you can federate more RabbitMQ instances over a WAN even with different Erlang versions.

Getting ready

You need two or more RabbitMQ nodes. In this example, we have used two Linux machines whose RabbitMQ node names are rabbit@rabbitmqc1 and rabbit@rabbitmqc2.

How to do it…

The federation plugin must be enabled; it's disabled by default. For both the machines, perform the following steps:

  1. Enable the plugin using the following command: ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required