docker pull apache/rocketmq //启用name server docker run -d --restart=always --name rmqnamesrv --privileged=true -p 9876:9876 -v /www/docker/rocketmq/nameserver/logs:/root/logs -v /www/docker/rocketmq/nameserver/store:/root/store -e "MAX_POSSIBLE_HEAP=100000000" apache/rocketmq sh mqnamesrv //启用broker docker run -d --restart=always --name rmqbroker -p 10911:10911 -p 10909:10909 --privileged=true -v /www/docker/rocketmq/data/broker/logs:/root/logs -v /www/docker/rocketmq/data/broker/store:/root/store -v /www/rocketmq/broker.conf:/opt/docker/rocketmq/broker.conf -e "NAMESRV_ADDR=172.21.32.2:9876" -e "MAX_POSSIBLE_HEAP=200000000" apache/rocketmq sh mqbroker -c /opt/docker/rocketmq/broker.conf //启用rocketmq-dashboard docker pull apacherocketmq/rocketmq-dashboard docker run -d --name rocketmq-dashboard -e "JAVA_OPTS=-Drocketmq.namesrv.addr=172.21.32.2:9876" -p 80:8080 -t apacherocketmq/rocketmq-dashboard:latest
broker 配置文件
///www/rocketmq/broker.conf
brokerClusterName = DefaultCluster
brokerName = broker-a
brokerId = 0
deleteWhen = 04
fileReservedTime = 48
brokerRole = ASYNC_MASTER
flushDiskType = ASYNC_FLUSH
brokerIP1 = 172.21.32.2