中间件: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 
相关推荐
aini_lovee1 天前
Node.js 中的中间件机制与 Express 应用
中间件·node.js·express
zhangbaolin1 天前
langchain agent的中间件
中间件·langchain·大模型·agent
little_xianzhong1 天前
三个常听到的消息/中间件MQTT RabbitMQ Kafka
java·笔记·中间件·消息队列
熙客3 天前
Kafka:专注高吞吐与实时流处理的分布式消息队列
分布式·中间件·kafka
9ilk3 天前
【基于one-loop-per-thread的高并发服务器】--- 前置技术
运维·服务器·c++·笔记·后端·中间件
小坏讲微服务5 天前
五分钟使用 Docker-compose搭建 Redis 8.0 中间件
运维·redis·docker·中间件·容器·kubernetes·k8s
熙客5 天前
RabbitMQ:灵活路由和高可靠的消息队列
java·中间件·rabbitmq·java-rabbitmq
9ilk6 天前
【仿RabbitMQ的发布订阅式消息队列】--- 前置技术
分布式·后端·中间件·rabbitmq
9ilk6 天前
【基于one-loop-per-thread的高并发服务器】--- 项目介绍&&模块划分
运维·服务器·c++·后端·中间件
fyakm6 天前
中间件的前世今生:起源与发展历程
中间件