[rabbitmq-discuss] Creating a rabbitmq.config for federation

Robert Parker reparker23 at gmail.com
Tue Oct 22 20:18:01 BST 2013


I'm having trouble finding good examples of how to configure 
a rabbitmq.config file to do what I've been doing with a set of rabbitmqctl 
commands.  Here's the script I use to configure clustering and federation 
for one of my rabbitmq clusters:

#!/bin/bash

rabbitmqctl stop_app
rabbitmqctl reset
rabbitmqctl join_cluster rabbit at rabbit2
rabbitmqctl start_app
rabbitmq-plugins enable rabbitmq_federation
rabbitmq-plugins enable rabbitmq_federation_management
rabbitmq-plugins enable rabbitmq_management
service rabbitmq-server restart

rabbitmqctl set_parameter federation-upstream cluster1-upstream 
'{"uri":["amqp://rabbit3.example.com","amqp://rabbit4.example.com"],"expires":3600000}'
rabbitmqctl set_policy federate-mything "^Mything$" 
'{"federation-upstream-set":"all"}' 0



How do I convert that into a format that will work in a rabbitmq.config so 
that all I need to do is drop this config file in, reset the node, then 
restart rabbitmq-server to get this configuration working?  Also, if you 
put your cluster config into rabbitmq.config  on both nodes to be 
clustered, will they automatically set the 
correct /var/lib/rabbitmq/.erlang.cookie or must that step still be done 
manually?

Thanks in advance
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20131022/877c5b59/attachment.htm>


More information about the rabbitmq-discuss mailing list