@Alex-Zhao
2018-04-26T15:17:28.000000Z
字数 840
阅读 104
中间件
rabbitmqctl add_user cashing-tier cashMel //创建用户和密码
rabbitmqctl delete_user cashing_tier //删除用户
rabbitmq list_user_permissons cashing-tier //查看用户在vhost cashing-tier上的权限
rabbitmqctl clear_permissions -p oak cashing-tier //删除权限
rabbitmqctl set_permissions -p sycamore \ cashing-tier ".*"".*"".*"
解释:
-p sycamore 这告诉set_permissions条目应该应用在那个vhost上
cashing-tier 被授予权限的用户
".""."".*" 这是授予的权限,分别映射到配置、写、读
rabbitmqctl cluster_status ---查看集群状态
rabbitmqctl list_users ---查看所有用户
rabbitmqctl list_connections ---用于查看当前的连接
rabbitmqctl list_queues ---会列出所有队列名称,后边可能还会带着这个队列当前消息数
rabbitmqctl list_queues | awk '{if ($2!=0) print $0}' ---查看所有未被消费的队列
rabbitmqctl status ---查看当前队列信息
rabbitmqctl list_queues [-p <vhost>] ---查看所有队列
rabbitmqctl list_exchange [-p <vhost>] ---查看交换器和绑定
rabbitmqctl list_vhosts ---查看所有vhost
rabbitmqctl -p ${vhost-name} purge_queue ${queue-name}