If I have RabbitMQ installed on my machine, is there a way to create a message queue from the command line and bind it to a certain exchange without using a client?
I think it is not possible, but I want to be sure.
rabbitmq
If I have RabbitMQ installed on my machine, is there a way to create a message queue from the command line and bind it to a certain exchange without using a client?
I think it is not possible, but I want to be sure.
Best Answer
Summary:
Other answers are good alternatives to what was asked for. Below are commands you can use from the command line.
First, do all the necessary prep work, e.g. install rabbit,
rabbitmqadmin
, andrabbitctl
. The idea is to use commands fromrabbitmqctl
andrabbitmqadmin
. You can see some command examples: https://www.rabbitmq.com/management-cli.htmlExample Commands/Setup:
The following commands should give you the majority if not all of what you need:
Add a user and permissions
Make a virtual host and Set Permissions
Make an Exchange
Make a Queue
Make a Binding
Alternative Way to Bind with Python
The following is an alternative to command line binding, as I've had issues with it sometimes and found the following python code to be more reliable.
The above can be run as part of a script using python. Notice I put the outgoing stuff into arrays, which will allow you to iterate through them. This should make things easy for deploys.
Last Thoughts
I think the above should get you moving in the right direction, use google if any specific commands don't make sense or read more with
rabbitmqadmin help subcommands
. I tried to use variables that explain themselves. Good luck :)