1.1. 控制台使用

RocketMQ 提供有控制台及一系列控制台命令,用于管理员对主题,集群,broker 等信息的管理

登录控制台

首先进入RocketMQ 工程,进入/RocketMQ/bin

在该目录下有个mqadmin 脚本

查看帮助

在mqadmin 下可以查看有哪些命令

sh mqadmin

查看具体命令的使用(以具体实现类为准)

sh mqadmin help 命令名称

例如,查看updateTopic 的使用

sh mqadmin help updateTopic

C. 详细命令

0.1. help

类路径com.alibaba.rocketmq.tools.command.MQAdminStartup

Option

OptionValue

Detail

-h

help

Print help

e.g. sh mqadmin

e.g. sh mqadmin topicList -h

e.g. sh mqadmin help topicList

0.2. System.setProperty(MixAll.NAMESRV_ADDR_PROPERTY, namesrvAddr);

类路径com.alibaba.rocketmq.tools.command.MQAdminStartup

Option

OptionValue

Detail

-n

namesrvAddr

Name server address list, eg: 192.168.0.1:9876;192.168.0.2:9876

备注:-n 指定多个地址时需要用双引号,如 -n “10.128.2.22:9876;172.16.50.238:9876”

原因:linux系统下分号连接两个命令,如果不使用会导致以下错误

错误:-bash: 172.16.50.238:9876: command not found

1.1. Fetch all topic list from name server

指令 topicList

类路径 com.alibaba.rocketmq.tools.command.topic.TopicListSubCommand

Option

OptionValue

Detail

-c

clusterModel

clusterModel

e.g. sh mqadmin topicList -c -n 172.16.50.238:9876

执行结果:

#Cluster Name         #Topic                                            #Consumer Group

DefaultCluster        MMSI_TOPIC                                        MMSI_LOGONCONSUMER_GROUP

DefaultCluster        BenchmarkTest

DefaultCluster        OFFSET_MOVED_EVENT                                __MONITOR_CONSUMER

DefaultCluster        TopicTest

DefaultCluster        broker-a

DefaultCluster        TBW102

DefaultCluster        SELF_TEST_TOPIC

DefaultCluster        DefaultCluster

1.2. Update or create topic

指令 updateTopic

类路径 com.alibaba.rocketmq.tools.command.topic.UpdateTopicSubCommand

Option

OptionValue

Detail

-b

brokerAddr

create subscription group to which broker

-c

clusterName

create subscription group to which cluster

-t

topic

topic name

-r

readQueueNums

set read queue nums

-w

writeQueueNums

set write queue nums

-p

perm

set topic's permission(2|4|6), intro[2:R; 4:W; 6:RW]

-o

order

set topic's order(true|false

-u

unit

is unit topic (true|false

-s

hasUnitSub

has unit sub (true|false

e.g. sh mqadmin updateTopic -b 172.16.50.238:10911 -t test

运行结果:

create topic to 172.16.50.238:10911 success.

TopicConfig [topicName=test, readQueueNums=8, writeQueueNums=8, perm=RW-, topicFilterType=SINGLE_TAG, topicSysFlag=0, order=false]

查询brokerAddr 见指令 clusterList

查询 topic 见指令 topicList

-b -c 二选一,见具体类文件。

1.3. Delete topic from broker and NameServer.

指令 deleteTopic

类路径 com.alibaba.rocketmq.tools.command.topic.DeleteTopicSubCommand

Option

OptionValue

Detail

-t

topic

topic name

-c

clusterName

delete topic from which cluster

查询clusterName 见指令 clusterList

查询 topic 见指令 topicList

e.g. sh mqadmin deleteTopic -t test -c DefaultCluster -n 172.16.50.238:9876

执行结果:

delete topic [test] from cluster [DefaultCluster] success.

delete topic [test] from NameServer success.

1.4. Examine topic route info

指令 topicRoute

类路径 com.alibaba.rocketmq.tools.command.topic.TopicRouteSubCommand

Option

OptionValue

Detail

-t

topic

topic name

e.g. sh mqadmin topicRoute -t TopicTest -n 172.16.50.238:9876

执行结果:

{

"brokerDatas":[

{

"brokerAddrs":{0:"172.16.50.238:10911"

},

"brokerName":"broker-a"

}

],

"filterServerTable":{},

"queueDatas":[

{

"brokerName":"broker-a",

"perm":6,

"readQueueNums":4,

"topicSynFlag":0,

"writeQueueNums":4

}

]

}

1.5. Examine topic Status info

指令 topicStatus

类路径com.alibaba.rocketmq.tools.command.topic.TopicStatusSubCommand

Option

OptionValue

Detail

-t

topic

topic name

e.g. sh mqadmin topicStatus -t TopicTest -n 172.16.50.238:9876

#Broker Name                     #QID  #Min Offset            #Max Offset               #Last Updated

broker-a                          0     0                     3275                    2015-05-06 13:06:56,990

broker-a                          1     0                     3270                    2015-05-06 13:00:01,439

broker-a                          2     0                     3270                    2015-05-06 13:00:01,469

broker-a                          3     0                     3270                    2015-05-06 13:00:01,499

1.6. Create or update or delete order conf

指令 updateOrderConf

类路径com.alibaba.rocketmq.tools.command.topic.UpdateOrderConfCommand

Option

OptionValue

Detail

-t

topic

topic name

-v

orderConf

set order conf [eg. brokerName1:num;brokerName2:num]

-m

method

option type [eg. put|get|delete

e.g. sh mqadmin updateOrderConf -t TopicTest -m delete -n 172.16.50.238:9876

2.1. Update or create subscription group

指令 updateSubGroup

类路径 com.alibaba.rocketmq.tools.command.consumer.UpdateSubGroupSubCommand

Option

OptionValue

Detail

-b

brokerAddr

create subscription group to which broker

-c

clusterName

create subscription group to which cluster

-g

groupName

consumer group name

-s

consumeEnable

consume enable

-m

consumeFromMinEnable

from min offset

-d

consumeBroadcastEnable

broadcast

-q

retryQueueNums

retry queue nums

-r

retryMaxTimes

retry max times

-i

brokerId

consumer from which broker id

-w

whichBrokerWhenConsumeSlowly

which broker id when consume slowly

2.2. Delete subscription group from broker.

指令 deleteSubGroup

类路径 com.alibaba.rocketmq.tools.command.consumer.DeleteSubscriptionGroupCommand

Option

OptionValue

Detail

-b

brokerAddr

delete subscription group from which broker

-c

clusterName

delete subscription group from which cluster

-g

groupName

subscription group name

2.3. Query consumers's progress, speed

指令 consumerProgress

类路径com.alibaba.rocketmq.tools.command.consumer.ConsumerProgressSubCommand

Option

OptionValue

Detail

-g

groupName

consumer group name

e.g. sh mqadmin consumerProgress -g MMSI_LOGONCONSUMER_GROUP -n 172.16.50.238:9876

执行结果:

#Topic                            #Broker Name                      #QID  #Broker Offset        #Consumer Offset      #Diff

MMSI_TOPIC                        broker-a                          0     12                    12                    0

MMSI_TOPIC                        broker-a                          1     4                     4                     0

MMSI_TOPIC                        broker-a                          2     3                     3                     0

MMSI_TOPIC                        broker-a                          3     3                     3                     0

Consume TPS: 0

Diff Total: 0

2.4. Query consumer's internal data structure

指令 consumerStatus

类路径com.alibaba.rocketmq.tools.command.consumer.ConsumerProgressSubCommand

Option

OptionValue

Detail

-g

groupName

consumer group name

e.g. sh mqadmin consumerStatus -g MMSI_LOGONCONSUMER_GROUP -n 172.16.50.238:9876

执行结果:

001  10.128.2.17@MMSI_C1_1430928642588        V3_2_4_SNAPSHOT      1430984926124/10.128.2.17@MMSI_C1_1430928642588

002  10.128.2.17@MMSI_C2_1430928728896        V3_2_4_SNAPSHOT      1430984926124/10.128.2.17@MMSI_C2_1430928728896

2.5. Start Monitoring

指令 startMonitoring

类路径com.alibaba.rocketmq.tools.command.consumer.StartMonitoringSubCommand

Option

OptionValue

Detail

3.1. Update broker's config

指令 updateBrokerConfig

类路径com.alibaba.rocketmq.tools.command.broker.UpdateBrokerConfigSubCommand

Option

OptionValue

Detail

-b

brokerAddr

update which broker

-c

clusterName

update which cluster

-k

key

config key

-v

value

config value

3.2. Fetch broker runtime status data

指令 brokerStatus

类路径com.alibaba.rocketmq.tools.command.broker.BrokerStatusSubCommand

Option

OptionValue

Detail

-b

brokerAddr

Broker address

e.g. sh mqadmin brokerStatus -b 172.16.50.238:10911

执行结果:

bootTimestamp                   : 1430977761125

brokerVersion                   : 74

brokerVersionDesc               : V3_2_4_SNAPSHOT

commitLogDiskRatio              : 0.057690158621641695

commitLogMaxOffset              : 1828298

commitLogMinOffset              : 0

consumeQueueDiskRatio           : 0.057690158621641695

dispatchMaxBuffer               : 0

getFoundTps                     : 0.0 0.0 0.0

getMessageEntireTimeMax         : 2

getMissTps                      : 1.996007984031936 1.9958751912713726 1.995861912967115

getTotalTps                     : 1.996007984031936 1.9958751912713726 1.995861912967115

getTransferedTps                : 0.0 0.0 0.0

msgGetTotalTodayMorning         : 0

msgGetTotalTodayNow             : 22

msgGetTotalYesterdayMorning     : 0

msgPutTotalTodayMorning         : 0

msgPutTotalTodayNow             : 0

msgPutTotalYesterdayMorning     : 0

putMessageAverageSize           : 0.0

putMessageDistributeTime        :

0(0.0%)

0(0.0%)

0(0.0%)

0(0.0%)

0(0.0%)

0(0.0%)

0(0.0%)

putMessageEntireTimeMax         : 0

putMessageSizeTotal             : 0

putMessageTimesTotal            : 1

putTps                          : 0.0 0.0 0.0

runtime                         : [ 0 days, 2 hours, 3 minutes, 44 seconds ]

sendThreadPoolQueueCapacity     : 100000

sendThreadPoolQueueSize         : 0

3.3. Clean expired ConsumeQueue on broker.

指令 cleanExpiredCQ

类路径com.alibaba.rocketmq.tools.command.broker.CleanExpiredCQSubCommand

Option

OptionValue

Detail

-b

brokerAddr

Broker address

-c

cluster

clustername

4.1. Query Message by Id

指令 queryMsgById

类路径com.alibaba.rocketmq.tools.command.message.QueryMsgByIdSubCommand

Option

OptionValue

Detail

-i

msgId

Message Id

-g

consumerGroup

consumer group name

-d

clientId

The consumer's client id

e.g. sh mqadmin queryMsgById -i AC1032EE00002A9F00000000001BE5CA -n 172.16.50.238:9876

执行结果:

Topic:               TopicTest

Tags:                [TagA]

Keys:                [null]

Queue ID:            0

Queue Offset:        3275

CommitLog Offset:    1828298

Reconsume Times:     0

Born Timestamp:      2015-05-07 16:04:45,282

Store Timestamp:     2015-05-07 16:04:29,589

Born Host:           172.16.10.103:64888

Store Host:          172.16.50.238:10911

System Flag:         0

Properties:          {WAIT=true, TAGS=TagA}

Message Body Path:   /tmp/rocketmq/msgbodys/AC1032EE00002A9F00000000001BE5CA

4.2. Query Message by Key

指令 queryMsgByKey

类路径com.alibaba.rocketmq.tools.command.message.QueryMsgByKeySubCommand

Option

OptionValue

Option

-t

topic

topic name

-k

msgKey

Message Key

e.g. sh mqadmin queryMsgByKey -t TopicTest -k key1 -n 172.16.50.238:9876

执行结果:

#Message ID                                            #QID                                  #Offset

AC1032EE00002A9F00000000001BE652                      0                                     3276

消息发送部分代码:

// new Message(String topic, String tags, String keys, byte[] body)

Message msg = new Message("TopicTest",

"TagA",

"key1",

("Hello RocketMQ " + i).getBytes()

);

4.3. Query Message by offset

指令 queryMsgByOffset

类路径com.alibaba.rocketmq.tools.command.message.QueryMsgByOffsetSubCommand

Option

OptionValue

Detail

-t

topic

topic name

-b

brokerName

Broker Name

-i

queueId

Queue Id

-o

offset

Queue Offset

e.g. sh mqadmin  queryMsgByOffset -t TopicTest -b broker-a -i 0 -o 3275 -n 172.16.50.238:9876

执行结果:

Topic:               TopicTest

Tags:                [TagA]

Keys:                [null]

Queue ID:            0

Queue Offset:        3275

CommitLog Offset:    1828298

Reconsume Times:     0

Born Timestamp:      2015-05-07 16:04:45,282

Store Timestamp:     2015-05-07 16:04:29,589

Born Host:           172.16.10.103:64888

Store Host:          172.16.50.238:10911

System Flag:         0

Properties:          {WAIT=true, TAGS=TagA}

Message Body Path:   /tmp/rocketmq/msgbodys/AC1032EE00002A9F00000000001BE5CA

4.4. Check Message Store

指令 checkMsg

类路径com.alibaba.rocketmq.tools.command.message.CheckMsgSubCommand

Option

OptionValue

Detail

-p

cStorePath

cStorePath

-s

cSize

cSize

-l

lStorePath

lStorePath

-z

lSize

lSize

4.5. Print Message Detail

指令 printMsg

类路径com.alibaba.rocketmq.tools.command.message.PrintMessageSubCommand

Option

OptionValue

Detail

-t

topic

topic name

-c

charsetName

CharsetName(eg: UTF-8、GBK)

-s

subExpression

Subscribe Expression(eg: TagA || TagB)

-b

beginTimestamp

Begin timestamp[currentTimeMillis|yyyy-MM-dd#HH:mm:ss:SSS]

-e

endTimestamp

End timestamp[currentTimeMillis|yyyy-MM-dd#HH:mm:ss:SSS]

e.g. sh mqadmin printMsg -t TopicTest -c UTF-8 -s TagA -n 172.16.50.238:9876

执行结果:

MSGID: AC1032EE00002A9F0000000000000198 MessageExt [queueId=3, storeSize=136, queueOffset=0, sysFlag=0, bornTimestamp=1430276116906, bornHost=/172.16.10.103:18048, storeTimestamp=1430276075650, storeHost=/172.16.50.238:10911, msgId=AC1032EE00002A9F0000000000000198, commitLogOffset=408, bodyCRC=1032136437, reconsumeTimes=0, preparedTransactionOffset=0, toString()=Message [topic=TopicTest, flag=0, properties={MIN_OFFSET=0, MAX_OFFSET=3270, WAIT=true, TAGS=TagA}, body=16]] BODY: Hello RocketMQ 3

MSGID: AC1032EE00002A9F00000000000003B8 MessageExt [queueId=3, storeSize=136, queueOffset=1, sysFlag=0, bornTimestamp=1430276117046, bornHost=/172.16.10.103:18048, storeTimestamp=1430276075794, storeHost=/172.16.50.238:10911, msgId=AC1032EE00002A9F00000000000003B8, commitLogOffset=952, bodyCRC=988340972, reconsumeTimes=0, preparedTransactionOffset=0, toString()=Message [topic=TopicTest, flag=0, properties={MIN_OFFSET=0, MAX_OFFSET=3270, WAIT=true, TAGS=TagA}, body=16]] BODY: Hello RocketMQ 7

MSGID: AC1032EE00002A9F00000000000005D9 MessageExt [queueId=3, storeSize=137, queueOffset=2, sysFlag=0, bornTimestamp=1430276117187, bornHost=/172.16.10.103:18048, storeTimestamp=1430276075930, storeHost=/172.16.50.238:10911, msgId=AC1032EE00002A9F00000000000005D9, commitLogOffset=1497, bodyCRC=2088767104, reconsumeTimes=0, preparedTransactionOffset=0, toString()=Message [topic=TopicTest, flag=0, properties={MIN_OFFSET=0, MAX_OFFSET=3270, WAIT=true, TAGS=TagA}, body=17]] BODY: Hello RocketMQ 11

MSGID: AC1032EE00002A9F00000000000007FD MessageExt [queueId=3, storeSize=137, queueOffset=3, sysFlag=0, bornTimestamp=1430276117312, bornHost=/172.16.10.103:18048, storeTimestamp=1430276076058, storeHost=/172.16.50.238:10911, msgId=AC1032EE00002A9F00000000000007FD, commitLogOffset=2045, bodyCRC=2079181465, reconsumeTimes=0, preparedTransactionOffset=0, toString()=Message [topic=TopicTest, flag=0, properties={MIN_OFFSET=0, MAX_OFFSET=3270, WAIT=true, TAGS=TagA}, body=17]] BODY: Hello RocketMQ 15

省略

5.1. Query producer's socket connection and client version

指令 producerConnection

类路径com.alibaba.rocketmq.tools.command.connection.ProducerConnectionSubCommand

Option

OptionValue

Detail

-g

producerGroup

producer group name

-t

topic

topic name

e.g. sh mqadmin producerConnection -t MMSI_TOPIC -g MMSI_LOGONPRODUCER_GROUP -n 10.128.2.22:9876

执行结果:

0001  10.128.2.21@MMSI_P_1430929646654 10.128.2.21:32772      JAVA     V3_2_4_SNAPSHOT

0002  10.128.2.20@MMSI_P_1430929321115 10.128.2.20:46473      JAVA     V3_2_4_SNAPSHOT

0003  10.128.2.21@MMSI_P_1430929575217 10.128.2.21:60998      JAVA     V3_2_4_SNAPSHOT

0004  10.128.2.19@MMSI_P_1430931090492 10.128.2.19:37579      JAVA     V3_2_4_SNAPSHOT

0005  10.128.2.19@MMSI_P_1430930993253 10.128.2.19:37555      JAVA     V3_2_4_SNAPSHOT

0006  10.128.2.18@MMSI_P_1430928908940 10.128.2.18:59844      JAVA     V3_2_4_SNAPSHOT

0007  10.128.2.18@MMSI_P_1430928940356 10.128.2.18:59872      JAVA     V3_2_4_SNAPSHOT

0008  10.128.2.17@MMSI_P_1430928637687 10.128.2.17:52707      JAVA     V3_2_4_SNAPSHOT

0009  10.128.2.20@MMSI_P_1430929358523 10.128.2.20:46690      JAVA     V3_2_4_SNAPSHOT

0010  10.128.2.17@MMSI_P_1430928722339 10.128.2.17:52634      JAVA     V3_2_4_SNAPSHOT

5.2. Query consumer's socket connection, client version and subscription

指令 consumerConnection

类路径com.alibaba.rocketmq.tools.command.connection.ConsumerConnectionSubCommand

Option

OptionValue

Detail

-g

consumerGroup

consumer group name

e.g. sh mqadmin consumerConnection -g MMSI_LOGONCONSUMER_GROUP -n 10.128.2.22:9876

执行结果:

001  10.128.2.17@MMSI_C2_1430928643191 10.128.2.17:52732      JAVA     V3_2_4_SNAPSHOT

002  10.128.2.21@MMSI_C1_1430929651766 10.128.2.21:32773      JAVA     V3_2_4_SNAPSHOT

003  10.128.2.20@MMSI_C1_1430929363864 10.128.2.20:46711      JAVA     V3_2_4_SNAPSHOT

004  10.128.2.19@MMSI_C1_1430931095730 10.128.2.19:36999      JAVA     V3_2_4_SNAPSHOT

005  10.128.2.18@MMSI_C1_1430928913978 10.128.2.18:59867      JAVA     V3_2_4_SNAPSHOT

006  10.128.2.20@MMSI_C2_1430929327217 10.128.2.20:46535      JAVA     V3_2_4_SNAPSHOT

007  10.128.2.19@MMSI_C1_1430930998362 10.128.2.19:37557      JAVA     V3_2_4_SNAPSHOT

008  10.128.2.21@MMSI_C2_1430929581143 10.128.2.21:61000      JAVA     V3_2_4_SNAPSHOT

009  10.128.2.18@MMSI_C2_1430928914953 10.128.2.18:59899      JAVA     V3_2_4_SNAPSHOT

010  10.128.2.17@MMSI_C1_1430928642588 10.128.2.17:52727      JAVA     V3_2_4_SNAPSHOT

011  10.128.2.17@MMSI_C1_1430928727537 10.128.2.17:52670      JAVA     V3_2_4_SNAPSHOT

012  10.128.2.18@MMSI_C2_1430928946637 10.128.2.18:59939      JAVA     V3_2_4_SNAPSHOT

013  10.128.2.17@MMSI_C2_1430928728896 10.128.2.17:52696      JAVA     V3_2_4_SNAPSHOT

014  10.128.2.21@MMSI_C1_1430929580732 10.128.2.21:60999      JAVA     V3_2_4_SNAPSHOT

015  10.128.2.18@MMSI_C1_1430928945559 10.128.2.18:59905      JAVA     V3_2_4_SNAPSHOT

016  10.128.2.20@MMSI_C1_1430929326429 10.128.2.20:46474      JAVA     V3_2_4_SNAPSHOT

017  10.128.2.19@MMSI_C2_1430930998829 10.128.2.19:37556      JAVA     V3_2_4_SNAPSHOT

018  10.128.2.21@MMSI_C2_1430929652131 10.128.2.21:32774      JAVA     V3_2_4_SNAPSHOT

019  10.128.2.19@MMSI_C2_1430931095854 10.128.2.19:37000      JAVA     V3_2_4_SNAPSHOT

020  10.128.2.20@MMSI_C2_1430929364329 10.128.2.20:46720      JAVA     V3_2_4_SNAPSHOT

Below is subscription:

001  Topic: MMSI_TOPIC                               SubExpression: MMSI_USERLOGON_TAG

002  Topic: %RETRY%MMSI_LOGONCONSUMER_GROUP          SubExpression: *

ConsumeType: CONSUME_PASSIVELY

MessageModel: CLUSTERING

ConsumeFromWhere: CONSUME_FROM_FIRST_OFFSET

6.1. List all of clusters

指令 clusterList

类路径com.alibaba.rocketmq.tools.command.cluster.ClusterListSubCommand

Option

OptionValue

Detail

-m

moreStats

Print more stats

e.g. sh mqadmin clusterList -m -n 172.16.50.238:9876

执行结果:

#Cluster Name     #Broker Name      #InTotalYest     #OutTotalYest   #InTotalToday   #OutTotalToday

DefaultCluster    broker-a                     0                0             2            9292

7.1. Create or update KV config.

指令 updateKvConfig

类路径com.alibaba.rocketmq.tools.command.namesrv.UpdateKvConfigCommand

Option

OptionValue

Detail

-s

namespace

set the namespace

-k

key

set the key name

-v

value

set the key value

7.2. Delete KV config.

指令 deleteKvConfig

类路径com.alibaba.rocketmq.tools.command.namesrv.DeleteKvConfigCommand

Option

OptionValue

Detail

-s

namespace

set the namespace

-k

key

set the key name

7.2. Create or update project group by server ip.

指令 updateProjectGroup

类路径 com.alibaba.rocketmq.tools.command.namesrv.UpdateProjectGroupCommand

Option

OptionValue

Detail

-i

ip

set the server ip

-p

project

set the project group

7.3. Delete project group by server ip.

指令 deleteProjectGroup

类路径com.alibaba.rocketmq.tools.command.namesrv.DeleteProjectGroupCommand

Option

OptionValue

Detail

-i

ip

set the server ip

-p

project

set the project group

7.4. Get project group by server ip or project group name.

指令 getProjectGroup

类路径com.alibaba.rocketmq.tools.command.namesrv.GetProjectGroupCommand

Option

OptionValue

Detail

-i

ip

set the server ip

-p

project

set the project group

7.5. Wipe write perm of broker in all name server

指令 wipeWritePerm

类路径com.alibaba.rocketmq.tools.command.namesrv.WipeWritePermSubCommand

Option

OptionValue

Detail

-b

brokerName

broker name

8.1. Reset consumer offset by timestamp(without client restart).

指令 resetOffsetByTime

类路径com.alibaba.rocketmq.tools.command.offset.ResetOffsetByTimeCommand

Option

OptionValue

Detail

-g

group

set the consumer group

-t

topic

set the topic

-s

timestamp

set the timestamp[currentTimeMillis|yyyy-MM-dd#HH:mm:ss:SSS]

-f

force

set the force rollback by timestamp switch[true|false]

8.2. Reset consumer offset by timestamp(execute this command required client restart).

指令 resetOffsetByTime

类路径com.alibaba.rocketmq.tools.command.offset.ResetOffsetByTimeCommand

Option

OptionValue

Detail

-g

group

set the consumer group

-t

topic

set the topic

-s

timestamp

set the timestamp[currentTimeMillis|yyyy-MM-dd#HH:mm:ss:SSS]

-f

force

set the force rollback by timestamp switch[true|false]

8.3. get consumer status from client.

指令 getConsumerStatus

类路径 com.alibaba.rocketmq.tools.command.offset.GetConsumerStatusCommand

Option

OptionValue

Detail

-g

group

set the consumer group

-t

topic

set the topic

-i

originClientId

set the consumer clientId

8.4. clone offset from other group.

指令 cloneGroupOffset

类路径 com.alibaba.rocketmq.tools.command.offset.CloneGroupOffsetCommand

Option

OptionValue

Detail

-s

srcGroup

set source consumer group

-d

destGroup

set destination consumer group

-t

topic

set the topic

-o

offline

the group or the topic is offline

RocketMQ 运维指令的更多相关文章

  1. rocketmq运维管理

    # 运维管理--- ### 1 集群搭建 #### 1.1 单Master模式 这种方式风险较大,一旦Broker重启或者宕机时,会导致整个服务不可用.不建议线上环境使用,可以用于本地测试. #### ...

  2. RocketMQ系列:rocketmq运维控制台使用详解(全网独家)

    搭建好了RocketMQ的console之后,直接在浏览器打开http://{你的ip}:8080 默认会进入到驾驶舱(dashboard). 总览 整体横向菜单分为八个部分: 运维:主要是设置nam ...

  3. HDFS中大数据常见运维指令总结

    一.查看HDFS下的参数信息 [root@master ~]# hdfs Usage: hdfs [--config confdir] COMMAND where COMMAND is one of: ...

  4. Linux常用运维指令

    cd data/apps./=========================================== ps -ef | grep tomcatps -ef | grep desktopX ...

  5. TDH-常见运维指令

    1.查看cpu: cat /proc/cpuinfo | grep processor2.查看磁盘:df -h (查看磁盘使用率) df -i (查看iNode使用) fdisk -l (查看磁盘整体 ...

  6. linux 运维指令

    [root@yan- ~] # uname -a # 查看内核/操作系统/CPU信息的linux系统信息命令 [root@yan- ~] # head -n /etc/issue # 查看操作系统版本 ...

  7. Rocket Mq 常用API 及简单运维

    RocketMQ 常用API 消息 消息消费模式 消息消费模式由消费者来决定,可以由消费者设置MessageModel来决定消息模式. 消息模式默认为集群消费模式 consumer.setMessag ...

  8. 自动化运维工具Ansible详细部署 (转载)

    自动化运维工具Ansible详细部署 标签:ansible 原创作品,允许转载,转载时请务必以超链接形式标明文章 原始出处 .作者信息和本声明.否则将追究法律责任.http://sofar.blog. ...

  9. 【运维工具】Git代码发布系统

    引言 代码发布系统是互联网公司必备的运维系统,作用主要用户发布业务代码 到 业务服务器 为什么需要代码发布系统 有的同学可能说,我们公司服务器就那么一台,做个发布系统太麻烦了? 不认同这说法 发布系统 ...

随机推荐

  1. oracle12c之 表空间维护总结

    1.1.创建永久表空间 In the CDB:SQL> CONNECT system@cdb1SQL> CREATE TABLESPACE cdb_users DATAFILE'/home ...

  2. Jmeter监控服务器的CPU

    1.Jmeter监控服务器的软件:链接: https://pan.baidu.com/s/1Ag75IXqR2XMe8RpZA4nvHg 密码: yki2 2.(1)Window版本 <1> ...

  3. C#细说多线程(下)

    本文主要从线程的基础用法,CLR线程池当中工作者线程与I/O线程的开发,并行操作PLINQ等多个方面介绍多线程的开发. 其中委托的BeginInvoke方法以及回调函数最为常用.而 I/O线程可能容易 ...

  4. rabbitMQ应用,laravel生产广播消息,springboot消费消息

    最近做一个新需求,用户发布了动态,前台需要查询,为了用户读取信息响应速度更快(MySQL很难实现或者说实现起来很慢),所以在用户动态发布成功后,利用消息机制异步构建 redis缓存 和 elastic ...

  5. laravel 数据库操作

    1 配置信息 1.1配置目录: config/database.php 1.2配置多个数据库 //默认的数据库 'mysql' => [ 'driver' => 'mysql', 'hos ...

  6. Oracle归档日志与非归档日志的切换及路径设置

    --==================== -- Oracle 归档日志 --==================== Oracle可以将联机日志文件保存到多个不同的位置,将联机日志转换为归档日志的 ...

  7. win xp 环境变量PATH默认值

    %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem

  8. .net下所有DLL(API)查询,转换C#代码

    地址: http://www.pinvoke.net/default.aspx/coredll.SetDevicePower 实例: SetDevicePower (coredll)   coredl ...

  9. (转)为C# Windows服务添加安装程序

    本文转载自:http://kamiff.iteye.com/blog/507129 最近一直在搞Windows服务,也有了不少经验,感觉权限方面确定比一般程序要受限很多,但方便性也很多.像后台运行不阻 ...

  10. IDEA中修改各个部位的字体大小

    1.菜单栏 Setting -> Appearance&Behavior -> Appearance ->Override default fonts by (not rec ...