[rabbitmq-discuss] Creating a rabbitmq.config for federation
tim at rabbitmq.com
Wed Oct 23 09:56:47 BST 2013
Argh - sorry Robert, that was a very incomplete answer. See inline below for more details...
On 23 Oct 2013, at 09:41, Tim Watson wrote:
> On 22 Oct 2013, at 20:18, Robert Parker wrote:
>> 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?
> Take a look at https://github.com/rabbitmq/rabbitmq-server/blob/master/docs/rabbitmq.config.example#L199.
That will allow you to get your nodes clustered when they first start, if required.
In order to get the various plugins to be enabled on start up, you'll have to edit the enabled-plugins file, the path to which is governed by the RABBITMQ_ENABLED_PLUGINS_FILE environment variable. This would need to look precisely thus:
Do not forget the final period (full stop), otherwise it won't parse and your nodes will likely refuse to start. You can run the `rabbitmq-plugins enable` commands first, and then take a copy of the file if you prefer.
In terms of the `rabbitmqctl set_parameter` commands that you're using to set a federation-upstream, that'll be a bit more complex. What you'll need to do is use the management plugin to export the definitions of your exchange(s), queue(s), binding(s) and so on. Once you've exported these, the json file can be automatically imported (and the definitions loaded thence) on startup, See the configuration example at https://github.com/rabbitmq/rabbitmq-server/blob/master/docs/rabbitmq.config.example#L243 for the syntax required (and note that this setting lives in the `rabbitmq_management` section, not the `rabbit` one.
Hopefully that'll get you going!
More information about the rabbitmq-discuss