开发者社区 > 云原生 > 云消息队列 > 正文

这个compose的yml有啥问题吗?我创建的本地不能连接到RocketMQ

这个compose的yml有啥问题吗?我创建的本地不能连接到RocketMQ
version: '3.8'

services:
namesrv:
image: apache/rocketmq:4.9.6
container_name: rmqnamesrv
ports:

  - 9876:9876
networks:
  - rocketmq
command: sh mqnamesrv

broker:
image: apache/rocketmq:4.9.6
container_name: rmqbroker
ports:

  - 10909:10909
  - 10911:10911
  - 10912:10912
environment:
  - NAMESRV_ADDR=rmqnamesrv:9876
volumes:
  - "./conf/broker/broker.conf:/home/rocketmq/rocketmq-4.9.6/conf/broker.conf"
  - "./conf/acl:/home/rocketmq/acl"
depends_on:
  - namesrv
networks:
  - rocketmq
command: sh mqbroker -c /home/rocketmq/rocketmq-4.9.6/conf/broker.conf

dashboard:
image: apacherocketmq/rocketmq-dashboard
ports:

  - 8888:8080
container_name: rocketmq-dashboard
networks:
  - rocketmq
volumes:
  - './dashboard/:/tmp/rocketmq-console/data'
environment:
  # - JAVA_OPTS=-Drocketmq.namesrv.addr=rmqnamesrv:9876 -Drocketmq.listen.port=10911
  - NAMESRV_ADDR=rmqnamesrv:9876
  - ROCKETMQ_CONFIG_LOGIN_REQUIRED=true

networks:
rocketmq:
driver: bridge

展开
收起
嘟嘟嘟嘟嘟嘟 2024-08-06 10:05:30 25 0
0 条回答
写回答
取消 提交回答

涵盖 RocketMQ、Kafka、RabbitMQ、MQTT、轻量消息队列(原MNS) 的消息队列产品体系,全系产品 Serverless 化。RocketMQ 一站式学习:https://rocketmq.io/

相关产品

  • 云消息队列 MQ
  • 热门讨论

    热门文章

    相关电子书

    更多
    RocketMQ Client-GO 介绍 立即下载
    RocketMQ Prometheus Exporter 打造定制化 DevOps 平台 立即下载
    基于 RocketMQ Prometheus Exporter 打造定制化 DevOps 平台 立即下载