rocketmq和topic有关的命令
时间: 2024-05-02 21:21:27 浏览: 171
1. 创建主题
```
./mqadmin updateTopic -n <nameserverAddr> -c <clusterName> -t <topicName> -r <readQueueNum> -w <writeQueueNum> -p <perm>
```
2. 删除主题
```
./mqadmin deleteTopic -n <nameserverAddr> -c <clusterName> -t <topicName>
```
3. 查看主题列表
```
./mqadmin topicList -n <nameserverAddr>
```
4. 查看主题信息
```
./mqadmin topicStatus -n <nameserverAddr> -t <topicName>
```
5. 查看主题路由信息
```
./mqadmin topicRoute -n <nameserverAddr> -t <topicName>
```
6. 查看主题配置
```
./mqadmin getTopicConfig -n <nameserverAddr> -t <topicName>
```
7. 更新主题配置
```
./mqadmin updateTopicConfig -n <nameserverAddr> -c <clusterName> -t <topicName> -r <readQueueNum> -w <writeQueueNum> -p <perm>
```
8. 查看主题消费组
```
./mqadmin queryTopicConsumeByWho -n <nameserverAddr> -t <topicName>
```
9. 查看主题消息
```
./mqadmin queryMsgById -n <nameserverAddr> -i <msgId>
./mqadmin queryMsgByKey -n <nameserverAddr> -t <topicName> -k <msgKey> -b <beginTime> -e <endTime> -f <flag> -s <maxNum>
./mqadmin queryMsgByUniqueKey -n <nameserverAddr> -t <topicName> -u <uniqueKey>
```
10. 删除主题消息
```
./mqadmin deleteMsgByMsgId -n <nameserverAddr> -i <msgId>
./mqadmin deleteMsgByMsgKey -n <nameserverAddr> -t <topicName> -k <msgKey>
./mqadmin deleteMsgByUniqueKey -n <nameserverAddr> -t <topicName> -u <uniqueKey>
```
阅读全文