rabbitmqadmin
v2 is a major revision of one of the RabbitMQ's CLI tools.
If you are migrating from the original rabbitqadmin
, please see Breaking or Potentially Breaking Changes
to learn about a few breaking change in the interface.
To download a binary build, see Releases.
For usage documentation, see Usage.
This version of rabbitmqadmin
has a few ideas in mind:
- This is a major version bump. Therefore, reasonable breaking changes are OK.
rabbitmqadmin
hasn't seen a revision in fourteen years rabbitmqadmin
should be standalone binary. There are very few reasons not to build and distribute it that way- Standalone project, not an obscure feature:
rabbitmqadmin
should be a standalone tool, not a relatively unknown "feature" of the RabbitMQ management plugin, and should be developed as such, not tied completely to the development environment, practices and release schedule of RabbitMQ itself - v2 should be a distributed via GitHub releases and not a special
rabbitmq_management
endpoint - There is a lot of room to improve validation of flags and arguments, since breaking changes are OK for v2
- This tool as free as practically possible from CVEs in other projects that show up on security scans.
CVEs from older Python versions should not plague OCI images that choose to include
rabbitmqadmin
- Output should be revisited: what columns are output by default, whether columns should be selectable
This version of rabbitmqadmin
should be considered reasonably mature to be used.
Before migrating, please see Breaking or Potentially Breaking Changes to learn about a few breaking change in the interface.
The following rabbitmqadmin
v1 features are not currently implemented:
- Configuration file support
- Support for TLS client (x.509, HTTPS) certificate and private key
To learn about what command groups and specific commands are available, run
rabbitmqadmin --help
Note that in this version, global flags must precede the command category (e.g. list
) and the command itself:
rabbitmqadmin --vhost "events" declare queue --name "target.quorum.queue.name" --type "quorum" --durable true
The same command will display global flags. To learn about a specific command, append
--help
to it:
rabbitmqadmin declare queue --help
rabbitmqadmin show overview
Helps assess connection, queue/stream, channel churn metrics in the cluster.
rabbitmqadmin show churn
rabbitmqadmin list nodes
rabbitmqadmin list vhosts
rabbitmqadmin list users
rabbitmqadmin list queues
rabbitmqadmin --vhost "monitoring" list queues
rabbitmqadmin list exchanges
rabbitmqadmin --vhost "events" list exchanges
rabbitmqadmin list bindings
rabbitmqadmin --vhost "events" list bindings
rabbitmqadmin --vhost "events" declare queue --name "target.quorum.queue.name" --type "quorum" --durable true
rabbitmqadmin --vhost "events" declare queue --name "target.stream.name" --type "stream" --durable true
rabbitmqadmin --vhost "events" declare queue --name "target.classic.queue.name" --type "classic" --durable false --auto_delete true
rabbitmqadmin --vhost "events" delete queue --name "target.queue.name"
rabbitmqadmin
v2 supports TOML-based configuration files
stores groups of HTTP API connection settings under aliases ("node names" in original rabbitmqadmin
speak).
Here is an example rabbitmqadmin
v2 configuration file:
[local]
hostname = "localhost"
port = 15672
username = "lolz"
password = "lolz"
vhost = '/'
[staging]
hostname = "192.168.20.31"
port = 15672
username = "staging-2387a72329"
password = "staging-1d20cfbd9d"
[production]
hostname = "(redacted)"
port = 15671
username = "user-2ca6bae15ff6b79e92"
password = "user-92ee4c479ae604cc72"
Instead of specifying --hostname
or --username
on the command line to connect to
a cluster (or specific node) called staging
, a --node
alias can be specified instead:
# will use the settings from the section called [staging]
rabbitmqadmin --node staging show churn
Default configuration file path is at $HOME/.rabbitmqadmin.conf
, as it was in
the original version of rabbitmqadmin
. It can be overridden on the command line:
# will use the settings from the section called [staging]
rabbitmqadmin --config $HOME/.configuration/rabbitmqadmin.conf --node staging show churn
Global flags in rabbitmqadmin
v2 must precede the command category (e.g. list
) and the command itself,
namely various HTTP API endpoint options and --vhost
:
rabbitmqadmin --vhost "events" declare queue --name "target.quorum.queue.name" --type "quorum" --durable true
rabbitmqadmin
v1 supported ini configuration files that allowed
the user to group a number of command line values under a name, e.g. a cluster or node nickname.
Due to the "no dependencies other than Python" design goal of rabbitmqadmin
v1, this feature was not really tested,
and the specific syntax (that of ini files, supported by Python's ConfigParser
) linting, parsing or generation tools were not really available.
rabbitmqadmin
v2 replaces this format with TOML, a popular configuration standard
with verification and linting tools, as well as very mature parser
that is not at all specific to rabbitmqadmin
v2.
Here is an example rabbitmqadmin
v2 configuration file:
[local]
hostname = "localhost"
port = 15672
username = "lolz"
password = "lolz"
vhost = '/'
[staging]
hostname = "192.168.20.31"
port = 15672
username = "staging-2387a72329"
password = "staging-1d20cfbd9d"
[production]
hostname = "(redacted)"
port = 15671
username = "user-efe1f4d763f6"
password = "(redacted)"
Please use GitHub Discussions in this repository and RabbitMQ community Discord server.
This tool, rabbitmqadmin
(v2 and later versions), is dual-licensed under
the Apache Software License 2.0 and the MIT license.