中间件: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 
相关推荐
小飞Coding20 分钟前
RocketMQ消费端核心原理:从单条消费到批量消费,一篇看懂所有参数
rocketmq
尝&试7 小时前
中间件--redis集群 大批量查询删除 优化及相关异常解决
redis·中间件·bootstrap
fuquxiaoguang7 小时前
十五五规划明确发力基础软件:中间件成为企业数字化与合规升级的刚性需求
中间件·国产化替代·十五五规划
小龙加油!!!7 小时前
k8s 部署中间件(mysql、redis、minio、nacos)并持久化数据
mysql·中间件·kubernetes
Haooog7 小时前
RocketMQ 高频面试题
rocketmq
1941s8 小时前
05-Agent 智能体开发实战指南(五):中间件系统与动态提示词
人工智能·python·中间件·langchain
Augustvic1 天前
gRPC基本原理
后端·http·中间件·rpc
马里奥Marioぅ1 天前
RocketMQ 迁移上云实践方案分享
rocketmq
Coder_Boy_2 天前
分布式系统核心技术完整梳理(含分库分表、分布式事务、熔断补偿)
jvm·分布式·spring·中间件
朱雨鹏3 天前
图解RocketMQ运行原理
后端·rocketmq