rabbitmqctl

Command-line tool for managing RabbitMQ

TLDR

List queues
$ rabbitmqctl list_queues
List queues with details
$ rabbitmqctl list_queues name messages consumers
List exchanges
$ rabbitmqctl list_exchanges
List connections
$ rabbitmqctl list_connections
Add user
$ rabbitmqctl add_user [username] [password]
Set user permissions
$ rabbitmqctl set_permissions [username] ".*" ".*" ".*"
Delete queue
$ rabbitmqctl delete_queue [queue_name]
Cluster status
$ rabbitmqctl cluster_status

SYNOPSIS

rabbitmqctl [-n node] [-t timeout] command [args]

DESCRIPTION

rabbitmqctl manages RabbitMQ message broker. It controls server operations, user management, and provides monitoring information.Queue listings show message counts, consumer connections, and memory usage. Column selection customizes output for monitoring scripts.User management handles authentication. Permission patterns (configure, write, read) control access to virtual hosts and resources.Cluster commands manage distributed deployments. Status shows node membership and synchronization state.The tool connects to the Erlang distribution for control. Node names identify targets in clustered environments.Monitoring commands support integration with external systems. JSON output enables automated processing.

PARAMETERS

list_queues [COLUMNS]

List queues with selected info.
list_exchanges [COLUMNS]
List exchanges.
list_bindings
List bindings.
list_connections [COLUMNS]
List connections.
list_channels [COLUMNS]
List channels.
list_users
List users.
add_user USER PASS
Add user.
delete_user USER
Delete user.
set_permissions USER CONF WRITE READ
Set permissions.
delete_queue QUEUE
Delete queue.
purge_queue QUEUE
Empty queue.
cluster_status
Show cluster status.
-n NODE
Target node.
-t TIMEOUT
Command timeout.

INSTALL

sudo dnf install rabbitmq-server
sudo apk add rabbitmq-server
sudo zypper install rabbitmq-server
nix profile install nixpkgs#rabbitmq-server

CAVEATS

Requires access to Erlang cookie. Some commands need administrator privileges. Cluster operations need careful coordination.

HISTORY

rabbitmqctl has been RabbitMQ's management CLI since the broker's release by Rabbit Technologies (acquired by VMware, now part of Broadcom) starting around 2007. It remains the primary administrative interface.

SEE ALSO

rabbitmq-server(8), rabbitmq-plugins(8), rabbitmq-diagnostics(8)