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
Create RabbitMq Exchange, Queue and Bindings dynamically from CLI on Windows
I already had a RabbitMQ Server installed and running with multiple queue and exchange and now wanted to create it on the fly from command line. I know it is an old question but I thought giving out this information will be helpful.
Following is what I did:
Setup
eg: C:\Python26\ C:\Python26\python C:\Python26\rabbitmqadmin.exe
Code:in a batch file used the below commands
Create exchange:
c:\python26\python.exe rabbitmqadmin.exe declare exchange name=ExchangeName1 type=topic durable=true
Create queue:
c:\python26\python.exe rabbitmqadmin.exe declare queue name=NameofQueue1 durable=true
Create binding:
c:\python26\python.exe rabbitmqadmin.exe declare binding source=ExchangeName1 destination_type=queue destination=NameofQueue1 routing_key=RoutingKey1
by executing rabbitmqadmin.exe -help -subcommands it lists all the available commands
eg: c:\python26\python.exe rabbitmqadmin.exe -help -subcommands