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.
You need two or more RabbitMQ nodes. In this example, we have used two Linux machines whose RabbitMQ node names are
The federation plugin must be enabled; it's disabled by default. For both the machines, perform the following steps: