RocketMQ系列:mqadmin命令行之broker操作
作者:互联网
简介
本文主要介绍updateBrokerConfig、brokerStatus,wipeWritePerm和getBrokerConfig
命令
- updateBrokerConfig :动态更新broker的配置(重启broker后会配置失效)
- brokerStatus :获取broker的运行时状态数据
- wipeWritePerm:设置某broker为只读
- getBrokerConfig:获取broker的配置信息
例子
getBrokerConfig
1)帮助
./mqadmin getBrokerConfig -h
2) 查看指定集群的所有broker信息
./mqadmin getBrokerConfig -c CLUSTERNAME -n nameserver1:9876
3)查看指定集群的某broker信息
./mqadmin getBrokerConfig -c CLUSTERNAME -n nameserver1:9876 -b 192.168.2.11:10911
updateBrokerConfig
1)帮助
./mqadmin updateBrokerConfig -h
2) 更新集群中所有broker的fileReservedTime为48
./mqadmin updateBrokerConfig -n nameserver1:9876 -c CLUSTERNAME -k fileReservedTime -v 48
3) 更新集群中指定broker的fileReservedTime为48
./mqadmin updateBrokerConfig -n nameserver1:9876 -c CLUSTERNAME -k fileReservedTime -v 48 -b 192.168.2.11:10911
brokerStatus
1)帮助
./mqadmin brokerStatus -h
2) 查看指定集群的所有broker运行时状态
./mqadmin brokerStatus -c CLUSTERNAME -n nameserver1:9876
3) 查看指定集群的某broker的运行时状态
./mqadmin brokerStatus -c CLUSTERNAME -n nameserver1:9876 -b 192.168.2.11:10911
wipeWritePerm
1)帮助
./mqadmin wipeWritePerm -h
2) 设置某broker为只读
./mqadmin wipeWritePerm -n nameserver1:9876 -b broker-a
注:nameserver1为设置的host,在/etc/hosts中设置的,CLUSTERNAME替换成你实际的CLUSTERNAME
博主:测试生财
座右铭:专注测试与自动化,致力提高研发效能;通过测试精进完成原始积累,通过读书理财奔向财务自由。
csdn:https://blog.csdn.net/ccgshigao
标签:CLUSTERNAME,nameserver1,mqadmin,broker,updateBrokerConfig,9876,RocketMQ 来源: https://www.cnblogs.com/qa-freeroad/p/13776674.html