rabbitmqadmin
Installation
_$: rabbitmq-plugins enable rabbitmq_management
_$: service rabbitmq-server restart
RabbitMQ < 3.0: port=55672
RabbitMQ >= 3.0: port=15672
Create an SSH tunnel to the server:
_$: ssh -L 15672:localhost:15672 user@server
Go to http://localhost:15672/ and check it is enabled:
- Login:
guest
- Password:
guest
Go to http://localhost:15672/cli/ and follow the instructions to get the rabbitmqadmin
binary.
_$: chmod +x rabbitmqadmin
_$: cp rabbitmqadmin /usr/local/bin
_$: rabbitmqadmin --bash-completion > /etc/bash_completion.d/rabbitmqadmin
Usage
List queues:
_$: rabbitmqadmin list queues name messages
Create queue:
_$: rabbitmqadmin declare queue name=00112233445566778899aabbccddeeff
Purge queue (remove messages and/or results from the queue):
_$: rabbitmqadmin purge queue name=00112233445566778899aabbccddeeff
Delete queue:
_$: rabbitmqadmin delete queue name=00112233445566778899aabbccddeeff
Delete all queues:
_$: rabbitmqctl list_queues | \
grep -vE '(celery|email|feed|photo|\.\.\.)' | \
cut -d$'\t' -f1 | \
xargs -I qn rabbitmqadmin delete queue name=qn