How do I load a RabbitMQ config at startup to confirm that broker objects (queues, exchanges, bindings, users, virtual hosts, permissions and parameters) are created?
According to the RabbitMQ documentation, it can be done via load_definitions
http://www.rabbitmq.com/management.html#load-definitions
But I can't figure out how to use it. Would someone mind sharing an example of how this works? I can't find any examples online.
%APPDATA%\RabbitMQ\rabbitmq.0+, the main configuration file is rabbitmq. conf . An additional config file named advanced. config is also used for some advanced configuration settings; it uses the classic format.
local, it can be accessed by users with sufficient privileges at either http://warp10.local:15672/ or http://localhost:15672/ (provided that localhost resolves correctly).
DESCRIPTION. rabbitmq-env. conf contains environment variables that override the defaults built in to the RabbitMQ scripts and CLI tools. The file is interpreted by the system shell, and so should consist of a sequence of shell environment variable definitions.
There's two bits that the documentation leaves to be desired that were stumbling blocks for me.
Generating the definitions file
I found the easiest way to do that is to configure one RabbitMQ server how you like it and then...
Configuring RabbitMQ to look for a definitions file at startup
Include a block like this in the configuration file:
{rabbitmq_management, [
{listener, [...]},
{load_definitions, "/etc/rabbitmq/definitions.json"} ]},
Upon startup, those definitions should get loaded. Any errors loading them should be apparent in the logs.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With