Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
$ python ./rabbitmqadmin
ERROR: Action not specified
rabbitmqadmin --help for help
$ python ./rabbitmqadmin --help
Usage
=====
rabbitmqadmin [options] subcommand
Options
=======
--help, -h show this help message and exit
--config=CONFIG, -c CONFIG
configuration file [default: ~/.rabbitmqadmin.conf]
--node=NODE, -N NODE node described in the configuration file [default:
'default' only if configuration file is specified]
--host=HOST, -H HOST connect to host HOST [default: localhost]
--port=PORT, -P PORT connect to port PORT [default: 15672]
--path-prefix=PATH_PREFIX
use specific URI path prefix for the RabbitMQ HTTP
API. /api and operation path will be appended to it.
(default: blank string) [default: ]
--vhost=VHOST, -V VHOST
connect to vhost VHOST [default: all vhosts for list,
'/' for declare]
--username=USERNAME, -u USERNAME
connect using username USERNAME [default: guest]
--password=PASSWORD, -p PASSWORD
connect using password PASSWORD [default: guest]
--base-uri=URI, -U URI connect using a base HTTP API URI. /api and operation
path will be appended to it. Path will be ignored.
--vhost has to be provided separately.
--quiet, -q suppress status messages [default: True]
--ssl, -s connect with ssl [default: False]
--ssl-key-file=SSL_KEY_FILE
PEM format key file for SSL
--ssl-cert-file=SSL_CERT_FILE
PEM format certificate file for SSL
--ssl-ca-cert-file=SSL_CA_CERT_FILE
PEM format CA certificate file for SSL
--ssl-disable-hostname-verification
Disables peer hostname verification
--ssl-insecure, -k Disables all SSL validations like curl's '-k' argument
--request-timeout=REQUEST_TIMEOUT, -t REQUEST_TIMEOUT
HTTP request timeout in seconds [default: 120]
--format=FORMAT, -f FORMAT
format for listing commands - one of [raw_json,
pretty_json, tsv, long, table, kvp, bash] [default:
table]
--sort=SORT, -S SORT sort key for listing queries
--sort-reverse, -R reverse the sort order
--depth=DEPTH, -d DEPTH
maximum depth to recurse for listing tables [default:
1]
--bash-completion Print bash completion script [default: False]
--version Display version and exit
More Help
=========
For more help use the help subcommand:
rabbitmqadmin help subcommands # For a list of available subcommands
rabbitmqadmin help config # For help with the configuration file
$ python ./rabbitmqadmin help subcommands 2>&1 | tee ~/Documents/rabbitmqadmin-output.txt
Usage
=====
rabbitmqadmin [options] subcommand
where subcommand is one of:
Display
=======
list connections [<column>...]
list channels [<column>...]
list consumers [<column>...]
list exchanges [<column>...]
list queues [<column>...]
list bindings [<column>...]
list users [<column>...]
list vhosts [<column>...]
list permissions [<column>...]
list nodes [<column>...]
list parameters [<column>...]
list policies [<column>...]
list operator_policies [<column>...]
list vhost_limits [<column>...]
show overview [<column>...]
Object Manipulation
===================
declare exchange name=... type=... [auto_delete=... durable=... internal=... arguments=...]
declare queue name=... [auto_delete=... durable=... arguments=... node=...]
declare binding source=... destination=... [destination_type=... routing_key=... arguments=...]
declare vhost name=... [tracing=...]
declare user name=... password=... tags=...
declare permission vhost=... user=... configure=... write=... read=...
declare parameter component=... name=... value=...
declare policy name=... pattern=... definition=... [priority=... apply-to=...]
declare operator_policy name=... pattern=... definition=... [priority=... apply-to=...]
declare vhost_limit name=... value=...
delete exchange name=...
delete queue name=...
delete binding source=... destination_type=... destination=... properties_key=...
delete vhost name=...
delete user name=...
delete permission vhost=... user=...
delete parameter component=... name=...
delete policy name=...
delete operator_policy name=...
delete vhost_limit name=...
close connection name=...
purge queue name=...
Broker Definitions
==================
export <file>
import <file>
Publishing and Consuming
========================
publish routing_key=... [payload=... properties=... exchange=... payload_encoding=...]
get queue=... [count=... ackmode=... payload_file=... encoding=...]
* If payload is not specified on publish, standard input is used
* If payload_file is not specified on get, the payload will be shown on
standard output along with the message metadata
* If payload_file is specified on get, count must not be set
$ python ./rabbitmqadmin list queues
+--------------------------------+----------+
| name | messages |
+--------------------------------+----------+
| amq.gen-eQzNCYXroV-3WBZRvJAPig | 13 |
+--------------------------------+----------+
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment