diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index 236571e4..a55c042f 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -363,14 +363,17 @@ services: - "10909:10909" - "10912:10912" environment: - JAVA_OPT_EXT: -server -Xms512M -Xmx512M -Xmn256m + JAVA_OPT: -server -Xms512M -Xmx512M + NAMESRV_ADDR: 127.0.0.1:9876 + # --enable-proxy 开启broker与proxy共用模式 生产部署建议将proxy单独部署 command: sh mqbroker --enable-proxy -c /home/rocketmq/rocketmq-5.2.0/conf/broker.conf depends_on: - - mqnamesrv + - rmqnamesrv volumes: - /docker/rocketmq/broker1/conf/broker.conf:/home/rocketmq/rocketmq-5.2.0/conf/broker.conf - /docker/rocketmq/broker1/logs:/home/rocketmq/logs/rocketmqlogs - /docker/rocketmq/broker1/store:/home/rocketmq/store + privileged: true network_mode: "host" rmqconsole: diff --git a/docker/rocketmq/broker1/conf/broker.conf b/docker/rocketmq/broker1/conf/broker.conf index 9d36a61b..39eeff6c 100644 --- a/docker/rocketmq/broker1/conf/broker.conf +++ b/docker/rocketmq/broker1/conf/broker.conf @@ -15,8 +15,6 @@ flushDiskType = ASYNC_FLUSH # 设置broker节点所在服务器的ip地址(**这个非常重要,主从模式下,从节点会根据主节点的brokerIP2来同步数据,如果不配置,主从无法同步,brokerIP1设置为自己外网能访问的ip,服务器双网卡情况下必须配置,比如阿里云这种,主节点需要配置ip1和ip2,从节点只需要配置ip1即可) # 此ip由使用环境决定 本机使用 127 局域网使用 192 外网使用 外网ip brokerIP1 = 192.168.31.165 -#nameServer地址,分号分割 -namesrvAddr = 127.0.0.1:9876 #Broker 对外服务的监听端口, listenPort = 10911 #是否允许Broker自动创建Topic