Download it from here (Right click,
Save as), make executable, and drop it in your path. Note that
many browsers will rename the
file rabbitmqadmin.txt
. You will need Python
2.6+. Currently this has had little testing, but it's
pretty simple.
Windows users will need to ensure Python is on their path, and
invoke rabbitmqadmin as python.exe
rabbitmqadmin
.
Invoke rabbitmqadmin --help
for usage
instructions. You can:
rabbitmqadmin --bash-completion
will print a bash
completion script for rabbitmqadmin. This should be redirected
to a file and source
d. On Debian-derived systems,
copy the file to /etc/bash_completion.d
to make it
available system-wide.
A few quick examples:
$ rabbitmqadmin -V test list exchanges +-------------+---------+-------+---------+-------------+ | name | durable | vhost | type | auto_delete | +-------------+---------+-------+---------+-------------+ | | True | test | direct | False | | amq.direct | True | test | direct | False | | amq.fanout | True | test | fanout | False | | amq.headers | True | test | headers | False | | amq.match | True | test | headers | False | | amq.topic | True | test | topic | False | +-------------+---------+-------+---------+-------------+
$ rabbitmqadmin list queues vhost name node messages message_stats_publish_details_rate +-------+----------------------------------+-------------------+----------+------------------------------------+ | vhost | name | node | messages | message_stats_publish_details_rate | +-------+----------------------------------+-------------------+----------+------------------------------------+ | / | amq.gen-UELtxwb8OGJ9XHlHJq0Jug== | rabbit@smacmullen | 0 | 100.985821591 | | / | test | rabbit@misstiny | 5052 | 100.985821591 | +-------+----------------------------------+-------------------+----------+------------------------------------+
$ rabbitmqadmin -f long -d 3 list queues -------------------------------------------------------------------------------- vhost: / name: amq.gen-UELtxwb8OGJ9XHlHJq0Jug== auto_delete: False backing_queue_status_avg_ack_egress_rate: 100.944672225 backing_queue_status_avg_ack_ingress_rate: 100.944672225 and so on, and on...
$ rabbitmqadmin -H myserver -u simon -p simon list vhosts +------+ | name | +------+ | / | +------+
$ rabbitmqadmin declare exchange name=my-new-exchange type=fanout exchange declared
$ rabbitmqadmin declare queue name=my-new-queue durable=false queue declared
$ rabbitmqadmin export rabbit.config Exported configuration for localhost to "rabbit.config"
$ rabbitmqadmin -q import rabbit.config
$ rabbitmqadmin -f tsv -q list connections name | while read conn ; do rabbitmqadmin close connection name=${conn} ; done