← 返回命令列表

Linux command

rabbitmqctl 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

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

说明

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.

参数

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.

FAQ

What is the rabbitmqctl command used for?

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.

How do I run a basic rabbitmqctl example?

Run `rabbitmqctl list_queues` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does list_queues _COLUMNS_ do in rabbitmqctl?

List queues with selected info.