pulsar、rocketmq常用命令
pulsar
/pulsar-client consume persistent://15069/testns/testt~1690533732454 -n 100 -s “consumer-test” -t “Exclusive”
./pulsar-client produce persistent://15069/testns/testt~1690533732454 -n 1 -m “Hello Pulsar”
./pulsar-admin topics create-subscription --subscription mycription persistent://13605/1111111111/business12~1690340680699
./pulsar-admin topics subscriptions persistent://13605/1111111111/business12~1690340680699
rocketmq
./mqadmin updateTopic -n namesrv_ip:9876 -c cluster_name -t topic_name -r 8 -w 8
./mqadmin sendMessage -n namesrv_ip:9876 -t test_topic -p “Hello World” -k mykey -c mytag
7、查看集群信息:可以查看Clustername和brokerName的信息
sh mqadmin clusterList -n 111.x.xx.xxx:9876
8、创建topic:
sh mqadmin updateTopic -c Clustername -n localhost:9876 -t zytesttopic
9、查看topic列表:
sh mqadmin topicList -n 111.x.xx.xxx:9876
10、查看指定topic路由信息:
sh mqadmin topicRoute -n 111.x.xx.xxx:9876 -t testtopic1
11、查看指定topic状态:
sh mqadmin topicStatus -n 11.x.xx.xxx:9876 -t testtopic1
12、创建消费者组:
sh mqadmin updateSubGroup -n localhost:9876 -c DefaultCluster -g testzygroup1
13、查看消费者组:查看订阅组消费状态
sh mqadmin consumerProgress -n localhost:9876
14、删除订阅组:
sh mqadmin deleteSubGroup -c DefaultCluster -n 127.0.0.1:9876 -g testzygroup1
15、发送消息:
mqadmin sendMessage -n 111.x.xx.xxx:19876 -t topic01 -p ‘hello messagebody’ -c tagtest -k keytest
16、消费消息:
sh mqadmin consumeMessage -n 111.x.xx.xxx:9876 -t zytesttopic -b rocketmq02-broker-0 -c 1 -g subzygroup1