Apache RocketMQ
Documentation
Blog
Community
Users
About
User Guide
Why RocketMQ
Quick Start
Simple Example
Order Example
Broadcasting Example
Schedule Example
Batch Example
Filter Example
Logappender Example
OpenMessaging Example
Transaction Example
FAQ
Release Notes
Download
Deployment & Operations
Architecture
Deployment
CLI Admin Tool
Contributor Guide
How To Contribute
Code Guidelines
Manage Pull Request
Release Manual
Best Practice
Core Concept
Broker
Producer
Consumer
NameServer
JVM/Kernel Config
CLI Admin Tool
RocketMQ provides a CLI admin tool belt to query, manage and diagnose various issues.
On This Page
Prerequisite
How To Get it
How to use
Command Manual
Prerequisite
Make sure you have walked through Quick Start and Core Concept sections.
How To Get it
The admin tool is shipped along with RocketMQ. Whether you download a pre-built binary version or build from source by yourself, you have the tool with the package.
If you want to look at the source code, please refer to rocketmq-tools module
How to use
The Admin Tool is very user friendly. Here, for demonstration purpose, *nix environment is assumed.
Change directory to ${PACKAGE}/bin, command bash mqadmin, you should see the following help menu.
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
queryMsgByUniqueKey Query Message by Unique key
printMsg 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
syncDocs Synchronize wiki and issue to github.com
allocateMQ Allocate MQ
checkMsgSendRT Check message send response time
clusterRT List All clusters Message Send RT
See 'mqadmin help ’ for more information on a specific command.
As you see, the most commonly used commands are listed with a brief description. To get detailed manual of each command, bash mqadmin help . For example, command bash mqadmin help clusterList will bring out the following help text:
usage: mqadmin clusterList [-h] [-i ] [-m] [-n ]
-h,–help Print help
-i,–interval specify intervals numbers, it is in seconds
-m,–moreStats Print more stats
-n,–namesrvAddr Name server address list, eg: 192.168.0.1:9876;192.168.0.2:9876
The help text lists possible options and interpretation of each option.
Command Manual
Updated: December 17, 2016
Share on
Twitter Facebook Google+ LinkedIn
Previous
Next
Leave a Comment
Apache Software Foundation
Follow: Twitter GitHub Feed
Copyright © 2020 The Apache Software Foundation. Licensed under the Apache License, Version 2.0.
Apache RocketMQ, RocketMQ, Apache, the Apache feather logo and the Apache RocketMQ logo are trademarks of The Apache Software Foundation.
License | Security | Thanks | Sponsorship