中间件: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 
相关推荐
逍遥德14 分钟前
SpringBoot自带TaskScheduler 接口实现定时任务的动态增、删、启、停。
java·spring boot·后端·中间件
lifewange31 分钟前
中间件细致控制原理 + 可编程实操
中间件
zkkkkkkkkkkkkk2 小时前
python使用celery实现异步任务
redis·python·rabbitmq·rocketmq
江湖中的阿龙3 小时前
消息队列核心面试题详解|RocketMQ深度剖析,含选型、可靠性、顺序性、幂等、积压、高可用、事务消息
rocketmq
小陶来咯6 小时前
aimrt中间件的使用
开发语言·qt·中间件
fuquxiaoguang6 小时前
架构模式革新:用“旁路镜像”改造老旧系统——中间件驱动的渐进式AI落地范式
人工智能·中间件·架构
逍遥德6 小时前
常见的任务调度框架介绍
java·spring boot·中间件
不会写程序的未来程序员6 小时前
从快递物流到分布式架构:RocketMQ全栈进阶实战指南——从入门到高手的代码与原理解析
分布式·架构·rocketmq
老码观察9 小时前
数环通消息中间件选型实录:RocketMQ vs Kafka vs RabbitMQ,我们为什么选了RocketMQ
kafka·rabbitmq·rocketmq
lifewange11 小时前
中间件细致控制原理 + 可编程实操(完整版落地手册)
中间件