Introduction
This article mainly introduces updateBrokerConfig, brokerStatus, wipeWritePerm and getBrokerConfig
command
updateBrokerConfig: dynamically update the configuration of the broker (the configuration will become invalid after restarting the broker)
brokerStatus: Get the runtime status data of the broker
wipeWritePerm: Set a broker as read-only
getBrokerConfig: Get broker configuration information
example
getBrokerConfig
1) Help
./mqadmin getBrokerConfig -h
2) View all broker information of the specified cluster
./mqadmin getBrokerConfig -c CLUSTERNAME -n nameserver1:9876
3) View a broker information of a specified cluster
./mqadmin getBrokerConfig -c CLUSTERNAME -n nameserver1:9876 -b 192.168.2.11:10911
updateBrokerConfig
1) Help
./mqadmin updateBrokerConfig -h
2) Update the fileReservedTime of all brokers in the cluster to 48
./mqadmin updateBrokerConfig -n nameserver1:9876 -c CLUSTERNAME -k fileReservedTime -v 48
3) Update the fileReservedTime of the specified broker in the cluster to 48
./mqadmin updateBrokerConfig -n nameserver1:9876 -c CLUSTERNAME -k fileReservedTime -v 48 -b 192.168.2.11:10911
brokerStatus
1) Help
./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