中间件: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 
相关推荐
六行神算API-天璇10 小时前
架构思考:大模型作为医疗科研的“智能中间件”
人工智能·中间件·架构·数据挖掘·ar
yours_Gabriel14 小时前
【一】常用中间件及用处
中间件
feathered-feathered15 小时前
Redis基础知识+RDB+AOF(面试)
java·数据库·redis·分布式·后端·中间件·面试
java_logo17 小时前
Transmission Docker 容器化部署指南
运维·docker·容器·kubernetes·apache·rocketmq·transmission
Geoking.20 小时前
什么是中间件?有哪些中间件?
中间件
闲人编程21 小时前
CORS跨域配置与安全策略
中间件·origin·跨域·cors·codecapsule·分离配置·最小权限
你真的可爱呀2 天前
2.Express 核心语法与路由
中间件·node.js·express
feathered-feathered2 天前
Redis【事务】(面试相关)与MySQL相比较,重点在Redis事务
android·java·redis·后端·mysql·中间件·面试
音符犹如代码2 天前
深入解析 Apollo:微服务时代的配置管理利器
java·分布式·后端·微服务·中间件·架构
武子康2 天前
Java-196 消息队列选型:RabbitMQ vs RocketMQ vs Kafka
java·分布式·kafka·rabbitmq·rocketmq·java-rocketmq·java-rabbitmq