# 存储根目录
storePathRootDir=/root/store
# CommitLog存放路径
storePathCommitLog=/root/store/commitlog
# 消息存放路径
storePathConsumeQueue=/root/store/consumequeue
# 消息索引存放路径
storePathIndex=/root/store/index
create system broadcast topic DefaultHeartBeatSyncerTopic failed on cluster DefaultCluster
rmq-proxy.json{
// 集群名称
"rocketMQClusterName": "DefaultCluster",
// 代理监听端口
"remotingListenPort": 8080,
// gRPC服务器端口
"grpcServerPort": 8081,
// 对应namesr的ip
"namesrvAddr":"172.16.69.243:9876"
}
部署ymlservices:
nameserver:
image: apache/rocketmq:5.3.0
command: sh mqnamesrv
container_name: nameserver
ports:
- 9876:9876
broker:
image: apache/rocketmq:5.3.0
command: sh mqbroker -c /etc/rocketmq/broker-a.properties autoCreateTopicEnable=true
volumes:
- /rocketmq/conf:/etc/rocketmq
- /rocketmq/store:/root/store
ports:
- 10909:10909
- 10911:10911
- 10912:10912
depends_on:
- nameserver
container_name: broker
proxy:
image: apache/rocketmq:5.3.0
container_name: proxy
depends_on:
- nameserver
- broker
volumes:
- /rocketmq/conf:/etc/rocketmq
command: sh mqproxy -pc /etc/rocketmq/rmq-proxy.json
ports:
- 8080:8080
- 8081:8081
restart: on-failure
172.16.69.244
services:
nameserver:
image: apache/rocketmq:5.3.0
command: sh mqnamesrv
container_name: nameserver
ports:
- 9876:9876
broker:
image: apache/rocketmq:5.3.0
command: sh mqbroker -c /etc/rocketmq/broker-a-s.properties autoCreateTopicEnable=true
volumes:
- /rocketmq/conf:/etc/rocketmq
- /rocketmq/store:/root/store
ports:
- 10909:10909
- 10911:10911
- 10912:10912
depends_on:
- nameserver
container_name: broker
proxy:
image: apache/rocketmq:5.3.0
container_name: proxy
depends_on:
- nameserver
- broker
volumes:
- /rocketmq/conf:/etc/rocketmq
command: sh mqproxy -pc /etc/rocketmq/rmq-proxy.json
ports:
- 8080:8080
- 8081:8081
restart: on-failure
检查存储路径:确保/root/store目录在容器内存在,并且具有正确的权限。
确认Nameserver状态:检查Nameserver的日志,确认其是否成功启动。
检查Broker集群配置:确认所有Broker都有正确的集群配置,并且能够互相通信。
验证Proxy配置:确认rmq-proxy.json配置文件中的namesrvAddr字段指向了正确的Nameserver地址,并且该地址可达。
审查Docker Compose文件:确保所有服务都在同一网络内,并且依赖关系正确设置。
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。
涵盖 RocketMQ、Kafka、RabbitMQ、MQTT、轻量消息队列(原MNS) 的消息队列产品体系,全系产品 Serverless 化。RocketMQ 一站式学习:https://rocketmq.io/