rocketmq 命令
时间: 2023-10-26 12:42:18 浏览: 115
RocketMQ的命令如下:
1. 启动NameServer命令:
nohup sh bin/mqnamesrv &
2. 启动Broker命令:
nohup sh bin/mqbroker -n localhost:9876 &
3. 查看NameServer运行状态命令:
sh bin/mqadmin status namesrv
4. 查看Broker运行状态命令:
sh bin/mqadmin status broker -n localhost:9876
5. 创建Topic命令:
sh bin/mqadmin updateTopicConfig -c DefaultCluster -n localhost:9876 -t topicName
6. 查看Topic状态命令:
sh bin/mqadmin topicStatus -n localhost:9876 -t topicName
7. 发送消息命令:
sh bin/tools.sh org.apache.rocketmq.example.quickstart.Producer
8. 消费消息命令:
sh bin/tools.sh org.apache.rocketmq.example.quickstart.Consumer
注意:以上命令均在RocketMQ安装目录下执行。
相关问题
启动 rocketmq 命令
以下是启动RocketMQ的命令:
1. 启动namesrv服务:
```shell
nohup sh bin/mqnamesrv &
```
日志目录:{rocketMQ解压目录}/logs/rocketmqlogs/namesrv.log
2. 启动broker服务:
```shell
nohup sh bin/mqbroker -n localhost:9876 &
```
其中,localhost:9876是namesrv服务的地址,根据实际情况进行修改。
rocketmq常用命令
RocketMQ常用命令包括以下几个:
1. 启动NameServer:nohup sh bin/mqnamesrv -n localhost:9876 &
2. 启动Broker:nohup sh bin/mqbroker -n localhost:9876 -c conf/broker.conf &
3. 查看可用命令:sh ./bin/mqadmin
4. 查看NameServer日志:tail -f ~/logs/rocketmqlogs/namesrv.log
5. 查看Broker日志:tail -f ~/logs/rocketmqlogs/broker.log
以上是一些常用的RocketMQ命令,可以用于启动和管理RocketMQ的NameServer和Broker。
#### 引用[.reference_title]
- *1* *3* [RocketMQ:常用命令汇总(mqadmin、mqnamesrv、mqbroker)](https://blog.csdn.net/Saintmm/article/details/120965301)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insert_down1,239^v3^insert_chatgpt"}} ] [.reference_item]
- *2* [rocketmq常用命令](https://blog.csdn.net/wwwwwww31311/article/details/118612674)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insert_down1,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文