LinuxCommandLibrary

rabbitmqctl

Command-line tool for managing RabbitMQ

TLDR

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

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.

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

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard