rockmq运维指令_RocketMQ运维指令.docx

RocketMQ运维指令

RocketMQ运维指令控制台使用RocketMQ提供控制台命令,用于管理员对Topic,Cluster,Broker等信息的管理;控制台:进入RocketMQ安装目录下/bin目录,该目录下mqadmin脚本即为控制台;查看指令集:sh mqadmin查看指令的使用方式sh mqadmin help 指令名称例如查看topicStatus的使用sh mqadmin help topicStatususage: mqadmin topicStatus [-h] [-n ] -t -h,--help Print help -n,--namesrvAddr Name server address list, :9876;:9876 -t,--topic Topic name详细命令创建Topic指令updateTopic类路径mand.topic.UpdateTopicSubCommand参数是否必填说明-b如果 -c为空,则必填broker地址,表示topic建在该broker-c如果 -b为空,则必填cluster名称,表示topic建在该集群,cluster通过clusterList查询-h否打印帮助-n是nameserve服务地址列表,格式ip:port;ip:port;...-p否指定权限(2|4|6), intro[2:R; 4:W; 6:RW]-r否可读队列数(默认为8)-w否可写队列数(默认为8)-t是topic名称(名称只能使用字符 ^[a-zA-Z0-9_-]+$ )-s否Hasunitsub (true|false)-u否Is unit topic (true|false)举例在集群DefaultCluster上创建主题testTopic,nameserve地址为:9876sh mqadmin updateTopic -n :9876 -c DefaultCluster -t testTopic打印内容:create topic to :9876:10911 success.TopicConfig[topicName=testTopic,readQueueNums=8,writeQueueNums=8,perm=RW-,topicFilterType=SINGLE_TAG, topicSysFlag=0, order=false]删除Topic指令deleteTopic类路径mand.topic.DeleteTopicSubCommand参数是否必填说明-c是cluster名称,集群可通过clusterList查询-h否打印帮助-n是nameserve服务地址列表,格式ip:port;ip:port;…-t是topic名称(名称只能使用字符 ^[a-zA-Z0-9_-]+$ )举例在集群DefaultCluster上删除主题testTopicsh mqadmin deleteTopic -n :9876 -c DefaultCluster -t testTopic查看Topic列表信息指令topicList类路径mand.broker.UpdateBrokerConfigSubCommand参数是否必填说明-h否打印帮助-n是nameserve服务地址列表,格式ip:port;ip:port;...举例nameserve地址为:9876sh mqadmin topicList -n :9876打印内容:BenchmarkTest%RETRY%simple-consumer-testSELF_TEST_TOPICTestTopic注释:上述前三个主题是RocketMQ默认预先创建查看Topic路由信息指令topicRoute类路径mand.topic.TopicRouteSubCommand参数是否必填说明-t是topic名称-h否打印帮助-n是nameserve服务地址列表,格式ip:port;ip:port;...举例查看主题testTopic的路由sh mqadmin topicRoute -t testTopic -n :9876打印内容:{"brokerDatas":[{"brokerAddrs":{0:":10911"},"brokerName":""}],"filterServerTable":{},"queueDatas":[{"brokerName":"","perm":6,"readQueueNums":8,"topicSynFlag":0,"writeQueueNums":8}]}查看Topic统计信息指令topicStatus类路径mand.topic.TopicStatsSubCommand参数是否必填说明-t是topic名称-h否打印

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值