AMQP协议简介
AMQP,即Advanced Message Queuing Protocol,一个提供统一消息服务的应用层标准高级消息队列协议,是应用层协议的一个开放标准,为面向消息的中间件设计。基于此协议的客户端与消息中间件可传递消息,并不受客户端/中间件不同产品,不同的开发语言等条件的限制。Erlang中的实现有 RabbitMQ等。文章来源地址https://www.toymoban.com/news/detail-699737.html
参考文章
###
https://blog.csdn.net/weixin_59334478/article/details/127706657
### 原理详解
https://zhuanlan.zhihu.com/p/344298279
RabbitMQ 常用运维命令
用户相关
## 创建用户,第二个knight 为密码
rabbitmqctl add_user knight knight
##设置用户分配操作权限
rabbitmqctl set_user_tags knight administrator
###
rabbitmqctl change_password gj xxxxx
##
rabbitmqctl set_permissions -p / knight ".*" ".*" ".*"
##
systemctl status rabbitmq-server
## 开启 web 访问
rabbitmq-plugins enable rabbitmq_management
### 删除用户
rabbitmqctl delete_user {username}
##
rabbitmqctl list_users
### 重新创建虚拟主机
rabbitmqctl add_vhost vhost_name
rabbitmqctl set_permissions -p vhost_name username ".*" ".*" ".*"
###
rabbitmqctl add_vhost /
rabbitmqctl set_permissions -p / gj ".*" ".*" ".*"
监控状态相关
### 服务器状态
rabbitmqctl status
###
rabbitmqctl list_bindings
###
rabbitmqctl list_exchanges
##
rabbitmqctl list_connections
#### 队列信息:
rabbitmqctl list_queues [-p vhostpath] [queueinfoitem …]
queueinfoitem可以为: name, durable, auto_delete, arguments, messages_ready, messages_unacknowled, messages, consumers, memory.
## Exchange信息:
rabbitmqctl list_exchanges [-p vhostpath] [exchangeinfoitem …]
exchangeinfoitem有:name, type, durable, auto_delete, internal, arguments.
### Binding信息:
rabbitmqctl list_bindings [-p vhostpath] [bindinginfoitem …]
### bindinginfoitem有:
source_name, source_kind, destination_name, destination_kind, routing_key, arguments.等
#### connection信息:
rabbitmqctl list_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
帮助相关
## 查看版本
rabbitmqctl version
## 查看帮助
rabbitmqctl -h
##
rabbitmqctl report
队列相关
##
rabbitmqctl list_queues
程序读写
## 参考
https://blog.csdn.net/knight_zhou/article/details/132722980
文章来源:https://www.toymoban.com/news/detail-699737.html
到了这里,关于RabbitMQ 常用运维命令的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!