中间件: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 
相关推荐
小园子的小菜7 小时前
RocketMQ中的NameServer主要数据结构
java·中间件·rocketmq·java-rocketmq
字节全栈_OYI1 天前
Koa 基础篇(二)—— 路由与中间件
中间件
谢大旭1 天前
ASP.NET Core 中间件
后端·中间件·c#
东阳马生架构5 天前
RocketMQ实战—2.RocketMQ集群生产部署
rocketmq
Lin_Miao_096 天前
RocketMQ优势剖析-性能优化
性能优化·rocketmq
东阳马生架构7 天前
RocketMQ实战—1.订单系统面临的技术挑战
rocketmq
大能嘚吧嘚8 天前
阿里云 - RocketMQ入门
阿里云·云计算·rocketmq
醉の虾8 天前
VUE3 使用路由守卫函数实现类型服务器端中间件效果
前端·vue.js·中间件
东阳马生架构8 天前
RocketMQ原理—5.高可用+高并发+高性能架构
rocketmq
hcja6668 天前
CVE-2024-23897-Jenkins任意文件读取漏洞复现
运维·web安全·网络安全·中间件·jenkins