服务启动:
rabbitmq-server –detached
服务关闭:
rabbitmqctl stop 若单机有多个实例,则在rabbitmqctl后加–n 指定名称
开启某个插件:
rabbitmq-plugins enable xxx
关闭某个插件:
rabbitmq-plugins disablexxx
注意:重启服务器后生效。
新建virtual_host:
rabbitmqctl add_vhost xxx
撤销virtual_host:
rabbitmqctl delete_vhost xxx
新建用户:
rabbitmqctl add_user xxx pwd
删除用户:
rabbitmqctl delete_user xxx
改密码:
rabbimqctl change_password {username} {newpassword}
设置用户角色:
rabbitmqctl set_user_tags {username} {tag ...}
Tag可以为 administrator,monitoring, management
权限设置:
set_permissions [-pvhostpath] {user} {conf} {write} {read}
服务器状态:
rabbitmqctl status
队列信息:
rabbitmqctl list_queues[-p vhostpath] [queueinfoitem ...]
Queueinfoitem可以为:name,durable,auto_delete,arguments,messages_ready,messages_unacknowledged,messages,consumers,memory
Exchange信息:
rabbitmqctl list_exchanges[-p vhostpath] [exchangeinfoitem ...]
Exchangeinfoitem有:name,type,durable,auto_delete,internal,arguments.
Binding信息:
rabbitmqctllist_bindings[-p vhostpath] [bindinginfoitem ...]
Bindinginfoitem有:source_name,source_kind,destination_name,destination_kind,routing_key,arguments
Connection信息:
rabbitmqctllist_connections [connectioninfoitem ...]
Connectioninfoitem有:recv_oct,recv_cnt,send_oct,send_cnt,send_pend等。
Channel信息:
rabbitmqctl list_channels[channelinfoitem ...]
Channelinfoitem有consumer_count,messages_unacknowledged,messages_uncommitted,acks_uncommitted,messages_unconfirmed,prefetch_count,client_flow_blocked