中间件:RocketMQ安装部署

单机部署

下载

shell 复制代码
cd /opt/soft/archive
wget https://archive.apache.org/dist/rocketmq/4.9.4/rocketmq-all-4.9.4-bin-release.zip
unzip -d ../ rocketmq-all-4.9.4-bin-release.zip

配置 broker.conf 的brokerIP1 为公网ip

启动命令:

shell 复制代码
nohup sh bin/mqnamesrv &
nohup sh bin/mqbroker -n localhost:9876 -c conf/broker.conf  &

集群部署

shell 复制代码
nohup sh bin/mqbroker -n '60.205.177.105:9876;60.205.204.171:9876;59.110.152.150:9876;60.205.203.101:9876;' -c /opt/rocketmq-4.9.3/conf/2m-2s-async/broker-a.properties &

nohup sh bin/mqbroker -n '60.205.177.105:9876;60.205.204.171:9876;59.110.152.150:9876;60.205.203.101:9876;' -c /opt/rocketmq-4.9.3/conf/2m-2s-async/broker-a-s.properties &

nohup sh bin/mqbroker -n '60.205.177.105:9876;60.205.204.171:9876;59.110.152.150:9876;60.205.203.101:9876;' -c /opt/rocketmq-4.9.3/conf/2m-2s-async/broker-b.properties &
 
nohup sh bin/mqbroker -n '60.205.177.105:9876;60.205.204.171:9876;59.110.152.150:9876;60.205.203.101:9876;' -c /opt/rocketmq-4.9.3/conf/2m-2s-async/broker-b-s.properties &

查看集群状态

shell 复制代码
sh mqadmin clusterList -n localhost:9876

基准测试

benchmark目录下

shell 复制代码
sh producer.sh -t xxx -n localhost:9876
sh consumer.sh -t xxx -n localhost:9876 
相关推荐
纪莫2 天前
Kafka如何保证「消息不丢失」,「顺序传输」,「不重复消费」,以及为什么会发生重平衡(reblanace)
java·分布式·后端·中间件·kafka·队列
要开心吖ZSH2 天前
java八股文-中间件-参考回答
微服务·中间件·消息中间件
db_murphy3 天前
知识篇 | 中间件会话保持和会话共享有啥区别?
中间件
现在,此刻3 天前
面试题储备-MQ篇 2-说说你对RocketMQ的理解
java·rocketmq·java-rocketmq
拷贝码农卡卡东3 天前
宿主机与容器通过 rmw_cyclonedds_cpp中间件进行ros2结点之间的通讯的相关注意事项
中间件
Apache RocketMQ5 天前
云原生事件驱动引擎(RocketMQ-EventBridge)应用场景与技术解析
云原生·消息队列·rocketmq·事件驱动引擎
墨鸦_Cormorant5 天前
MQTT(轻量级消息中间件)基本使用指南
mqtt·中间件·消息中间件
不畏惧的少年5 天前
RocketMQ核心概念
rocketmq
Python私教7 天前
从“Hello World”到“高并发中间件”:Go 语言 2025 系统学习路线图
学习·中间件·golang