中间件: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 
相关推荐
ThsPool2 天前
【ENVI二次开发学习整理 02】IDL语言基础与程序设计
学习·中间件
程序员良辰2 天前
【TongWeb7】启动接近两分钟问题排查
java·开发语言·中间件
晚安code4 天前
RocketMQ 顺序消费实战:批量接口加 Redis Pipeline同步数据
redis·rocketmq
哎呦,帅小伙哦4 天前
Nanomsg库AIO模块学习心得
中间件·nanomsg
晚安code5 天前
RocketMQ 延迟消息实战:延迟双删策略解决 Redis 缓存一致性
redis·rocketmq
风样滴男人哟6 天前
spark streaming消费rocketmq的几种方式
大数据·spark·rocketmq
IT界的老黄牛6 天前
限流命中后该怎么办:直接丢、阻塞等待、延迟重投三种姿势的取舍
java·rocketmq·redisson·令牌桶·削峰·分布式限流
摇滚侠7 天前
《RocketMQ 官网》阅读笔记 RocketMQ 普通消息 延时消息 顺序消息 事务消息
笔记·rocketmq
阿里云云原生7 天前
RocketMQ 高可用创新论文入选 ACM FSE:无需复制业务数据,实现有状态服务秒级接管
rocketmq
重庆小透明7 天前
带你从不同视角了解三大MQ
java·学习·spring·kafka·rabbitmq·rocketmq