From caa25d0b4085140902769dcd6e31589ee4b5e545 Mon Sep 17 00:00:00 2001 From: KennyLee Date: Mon, 9 Mar 2020 09:40:34 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=20rocketmq=20=E9=95=9C?= =?UTF-8?q?=E5=83=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- rocketmq/cluster/broker1/conf/broker.conf | 2 ++ rocketmq/cluster/broker2/conf/broker.conf | 3 +++ rocketmq/cluster/docker-compose.yml | 4 ++++ rocketmq/standalone/conf/broker.conf | 3 +++ rocketmq/standalone/docker-compose.yml | 5 ++++- 5 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 rocketmq/standalone/conf/broker.conf diff --git a/rocketmq/cluster/broker1/conf/broker.conf b/rocketmq/cluster/broker1/conf/broker.conf index a8f04e2..070f2a0 100644 --- a/rocketmq/cluster/broker1/conf/broker.conf +++ b/rocketmq/cluster/broker1/conf/broker.conf @@ -5,3 +5,5 @@ deleteWhen = 04 fileReservedTime = 48 brokerRole = ASYNC_MASTER flushDiskType = ASYNC_FLUSH +#set `brokerIP1` if you want to set physical IP as broker IP. +#brokerIP1=127.0.0.1 diff --git a/rocketmq/cluster/broker2/conf/broker.conf b/rocketmq/cluster/broker2/conf/broker.conf index 37c8a5f..d1156d0 100644 --- a/rocketmq/cluster/broker2/conf/broker.conf +++ b/rocketmq/cluster/broker2/conf/broker.conf @@ -5,3 +5,6 @@ deleteWhen = 04 fileReservedTime = 48 brokerRole = ASYNC_MASTER flushDiskType = ASYNC_FLUSH +#set `brokerIP1` if you want to set physical IP as broker IP. +#brokerIP1=127.0.0.1 + diff --git a/rocketmq/cluster/docker-compose.yml b/rocketmq/cluster/docker-compose.yml index 784379a..435fcc2 100644 --- a/rocketmq/cluster/docker-compose.yml +++ b/rocketmq/cluster/docker-compose.yml @@ -27,6 +27,8 @@ services: - ./data/broker/store:/home/rocketmq/store - ./broker1/conf/broker.conf:/opt/rocketmq-${ROCKETMQ_VERSION}/conf/broker.conf command: sh mqbroker -c /opt/rocketmq-${ROCKETMQ_VERSION}/conf/broker.conf + depends_on: + - namesrv #Service for another broker -- broker1 broker1: @@ -45,3 +47,5 @@ services: - ./data1/broker/store:/home/rocketmq/store - ./broker2/conf/broker.conf:/opt/rocketmq-${ROCKETMQ_VERSION}/conf/broker.conf command: sh mqbroker -c /opt/rocketmq-${ROCKETMQ_VERSION}/conf/broker.conf + depends_on: + - namesrv diff --git a/rocketmq/standalone/conf/broker.conf b/rocketmq/standalone/conf/broker.conf new file mode 100644 index 0000000..e416cb0 --- /dev/null +++ b/rocketmq/standalone/conf/broker.conf @@ -0,0 +1,3 @@ +listenPort = 10911 +#set `brokerIP1` if you want to set physical IP as broker IP. +brokerIP1 = 127.0.0.1 diff --git a/rocketmq/standalone/docker-compose.yml b/rocketmq/standalone/docker-compose.yml index b69830a..9a07788 100644 --- a/rocketmq/standalone/docker-compose.yml +++ b/rocketmq/standalone/docker-compose.yml @@ -25,5 +25,8 @@ services: volumes: - ./data/broker/logs:/home/rocketmq/logs - ./data/broker/store:/home/rocketmq/store - command: sh mqbroker + - ./conf/broker.conf:/home/rocketmq/rocketmq-4.6.0/conf/broker.conf + command: sh mqbroker -n namesrv:9876 -c ../conf/broker.conf + depends_on: + - namesrv