• 欢迎访问运维搬运工网站,推荐使用最新版火狐浏览器和Chrome浏览器访问本网站。
  • 本站一年会员:100元 ,两年会员:180元 ,永久会员:380元
  • 这世界就是,一些人总在昼夜不停地运转,而另外一些人,起床就发现世界已经变了。
  • 本博客推广的是知识付费,用赞助的方式实现博客维护,不以赚钱为目的的博客

rocketmq使用

创建topic

[root@mq-master01 bin]# pwd
/usr/local/rocketmq/bin

[root@mq-master01 bin]# sh mqadmin updateTopic -n 192.168.1.82:9876 -c rocketmq-cluster -t lucky 
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option PermSize=128m; support was removed in 8.0
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=128m; support was removed in 8.0
create topic to 192.168.1.83:10911 success.
create topic to 192.168.1.82:10911 success.
TopicConfig [topicName=lucky, readQueueNums=8, writeQueueNums=8, perm=RW-, topicFilterType=SINGLE_TAG, topicSysFlag=0, order=false][root@mq-master01 bin]#

删除topic

[root@mq-master01 bin]# sh mqadmin deleteTopic -n 192.168.1.82:9876 -c rocketmq-cluster -t lucky 
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option PermSize=128m; support was removed in 8.0
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=128m; support was removed in 8.0
delete topic [lucky] from cluster [rocketmq-cluster] success.
delete topic [lucky] from NameServer success.

查看所有topic信息

[root@mq-master01 bin]# sh mqadmin topicList -n 192.168.1.82:9876
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option PermSize=128m; support was removed in 8.0
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=128m; support was removed in 8.0
RMQ_SYS_TRANS_HALF_TOPIC
rocketmq-cluster
broker-b
BenchmarkTest
OFFSET_MOVED_EVENT
broker-a
TBW102
%RETRY%TOOLS_CONSUMER
SELF_TEST_TOPIC
[root@mq-master01 bin]# sh mqadmin topicList -n 192.168.1.83:9876
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option PermSize=128m; support was removed in 8.0
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=128m; support was removed in 8.0
lucky
RMQ_SYS_TRANS_HALF_TOPIC
rocketmq-cluster
broker-b
BenchmarkTest
OFFSET_MOVED_EVENT
broker-a
TBW102
%RETRY%TOOLS_CONSUMER
SELF_TEST_TOPIC

查看topic统计信息

[root@mq-master01 bin]# sh mqadmin topicStatus -n 192.168.1.83:9876 -t TBW102 
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option PermSize=128m; support was removed in 8.0
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=128m; support was removed in 8.0
#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-b 0 0 0 
broker-b 1 0 0 
broker-b 2 0 0 
broker-b 3 0 0

查看所有消费组group

[root@mq-master01 bin]# sh mqadmin consumerProgress -n 192.168.1.83:9876
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option PermSize=128m; support was removed in 8.0
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=128m; support was removed in 8.0
#Group #Count #Version #Type #Model #TPS #Diff Total
TOOLS_CONSUMER 0 OFFLINE 0 0

查询集群消息

[root@mq-master01 bin]# sh mqadmin clusterList -n 192.168.1.82:9876
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option PermSize=128m; support was removed in 8.0
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=128m; support was removed in 8.0
#Cluster Name #Broker Name #BID #Addr #Version #InTPS(LOAD) #OutTPS(LOAD) #PCWait(ms) #Hour #SPACE
rocketmq-cluster broker-a 0 192.168.1.82:10911 V4_4_0 0.00(0,0ms) 0.00(0,0ms) 0 433905.38 -1.0000
rocketmq-cluster broker-b 0 192.168.1.83:10911 V4_4_0 0.00(0,0ms) 0.00(0,0ms) 0 433905.38 -1.0000

 


运维搬运工 , 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:rocketmq使用
喜欢 (0)
[扫描二维码]
分享 (0)
大自然搬运工
关于作者:
不是路不平,而是你不行。到底行不行,看你停不停。只要你不停,早晚都能行。
发表我的评论
取消评论
表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址