Add backup nodes to the RabbitMQ master node cluster to help you enable queue
mirroring. This ensures that messages published to a queue are replicated to all
mirrors.
Procedure
-
On each node, right-click the RabbitMQ Command Prompt (sbin dir) application and select
Run as administrator.
This application is installed with RabbitMQ by default
-
To stop the node, execute the following command:
-
To add the node to the cluster, execute the following command:
rabbitmqctl.bat join_cluster rabbit@<MasterNodeName>
NOTE: <MasterNodeName> is case sensitive.
-
To restart the node, execute the following command:
rabbitmqctl start_app
NOTE: You can verify that the correct node has been added successfully by executing the
following command:
rabbitmqctl.bat cluster_status
or through the
RabbitMQ web interface at
https://<node
hostname>:15671.
-
Enable queue mirroring on each node so they become highly available:
-
On all the nodes, including the master node, open the RabbitMQ Command
Prompt.
-
Execute the following command:
rabbitmqctl.bat set_policy ha-all "" "{""ha-mode"":""all"", ""ha-sync-mode"":""automatic""}"