栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Java

RocketMQ mqadmin 常用管理命令

Java 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

RocketMQ mqadmin 常用管理命令

https://www.bianchengquan.com/article/136549.html 系列
  • RocketMQ mqadmin 常用管理命令
  • RocketMQ mqadmin 交互流程
开篇
  • 这个系列的主要目的是介绍mqadmin管理工具,在这个系列当中会介绍mqadmin的常用管理命令 和 mqadmin的命令执行流程。

  • 这篇文章主要介绍mqadmin的常用管理命令,包括如何查看所有命令以及针对指定命令查看帮助手册等。

常用命令
The most commonly used mqadmin commands are:
   updateTopic          Update or create topic
   deleteTopic          Delete topic from broker and NameServer.
   updateSubGroup       Update or create subscription group
   deleteSubGroup       Delete subscription group from broker.
   updateBrokerConfig   Update broker`s config
   updateTopicPerm      Update topic perm
   topicRoute           Examine topic route info
   topicStatus          Examine topic Status info
   topicClusterList     get cluster info for topic
   brokerStatus         Fetch broker runtime status data
   queryMsgById         Query Message by Id
   queryMsgByKey        Query Message by Key
   queryMsgByUniqueKey  Query Message by Unique key
   queryMsgByOffset     Query Message by offset
   printMsg             Print Message Detail
   printMsgByQueue      Print Message Detail
   sendMsgStatus        send msg to broker.
   brokerConsumeStats   Fetch broker consume stats data
   producerConnection   Query producer`s socket connection and client version
   consumerConnection   Query consumer`s socket connection, client version and subscription
   consumerProgress     Query consumers`s progress, speed
   consumerStatus       Query consumer`s internal data structure
   cloneGroupOffset     clone offset from other group.
   clusterList          List all of clusters
   topicList            Fetch all topic list from name server
   updateKvConfig       Create or update KV config.
   deleteKvConfig       Delete KV config.
   wipeWritePerm        Wipe write perm of broker in all name server
   resetOffsetByTime    Reset consumer offset by timestamp(without client restart).
   updateOrderConf      Create or update or delete order conf
   cleanExpiredCQ       Clean expired ConsumeQueue on broker.
   cleanUnusedTopic     Clean unused topic on broker.
   startMonitoring      Start Monitoring
   statsAll             Topic and Consumer tps stats
   allocateMQ           Allocate MQ
   checkMsgSendRT       check message send response time
   clusterRT            List All clusters Message Send RT
   getNamesrvConfig     Get configs of name server.
   updateNamesrvConfig  Update configs of name server.
   getBrokerConfig      Get broker config by cluster or special broker!
   queryCq              Query cq command.
   sendMessage          Send a message
   consumeMessage       Consume message
   updateAclConfig      Update acl config yaml file in broker
   deleteAccessConfig   Delete Acl Config Account in broker
   clusterAclConfigVersion List all of acl config version information in cluster
   updateGlobalWhiteAddr Update global white address for acl Config File in broker
   getAccessConfigSubCommand List all of acl config information in cluster

See 'mqadmin help ' for more information on a specific command.

查看指定命令
mqadmin updateTopicPerm --help


usage: mqadmin updateTopicPerm [-b ] [-c ] [-h] [-n ] -p  -t 
 -b,--brokerAddr     create topic to which broker
 -c,--clusterName    create topic to which cluster
 -h,--help                Print help
 -n,--namesrvAddr    Name server address list, eg: 192.168.0.1:9876;192.168.0.2:9876
 -p,--perm           set topic's permission(2|4|6), intro[2:W; 4:R; 6:RW]
 -t,--topic          topic name
mqadmin updateTopic --help

usage: mqadmin updateTopic -b  | -c   [-h] [-n ] [-o ] [-p ] [-r ] [-s ] -t
        [-u ] [-w ]
 -b,--brokerAddr        create topic to which broker
 -c,--clusterName       create topic to which cluster
 -h,--help                   Print help
 -n,--namesrvAddr       Name server address list, eg: 192.168.0.1:9876;192.168.0.2:9876
 -o,--order             set topic's order(true|false)
 -p,--perm              set topic's permission(2|4|6), intro[2:W 4:R; 6:RW]
 -r,--readQueueNums     set read queue nums
 -s,--hasUnitSub        has unit sub (true|false)
 -t,--topic             topic name
 -u,--unit              is unit topic (true|false)
 -w,--writeQueueNums    set write queue nums
mqadmin consumerProgress --help


usage: mqadmin consumerProgress [-g ] [-h] [-n ] [-s ]
 -g,--groupName       consumer group name
 -h,--help                 Print help
 -n,--namesrvAddr     Name server address list, eg: 192.168.0.1:9876;192.168.0.2:9876
 -s,--showClientIP    Show Client IP per Queue

执行指定命令
mqadmin topicStatus -n localhost:9876 -t TBW102


#Broker Name                      #QID  #Min Offset           #Max Offset             #Last Updated
broker-a                          0     0                     0                       
broker-a                          1     0                     0                       
broker-a                          2     0                     0                       
broker-a                          3     0                     0                       
broker-a                          4     0                     0                       
broker-a                          5     0                     0                       
broker-a                          6     0                     0                       
broker-a                          7     0                     0                       

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/976125.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号