Docker installing rocketmq

Ask Youlong time 2021-10-14 04:49:50

1、 Pull the mirror image

docker pull rocketmqinc/rocketmq

2、 start-up mqnamesrv

docker run -d --name=rmqnamesrv -p 9876:9876 -v D:\download\docker\rocketmq\nameserver\logs:/root/logs -v D:\download\docker\rocketmq\nameserver\store:/root/store -e "MAX_POSSIBLE_HEAP=100000000" rocketmqinc/rocketmq sh mqnamesrv

3、 start-up broker

New configuration file broker.cnf

# Cluster name , If there are many nodes, you can configure multiple
brokerClusterName = DefaultCluster
#broker name ,master and slave Use the same name , Show their master-slave relationship
brokerName = broker-a
#0 Express Master, Greater than 0 It means different slave
brokerId = 0
# Indicates when to delete messages , The default is in the early morning 4 spot
deleteWhen = 04
# How long to keep messages on disk , In hours
fileReservedTime = 48
# There are three values :SYNC_MASTER,ASYNC_MASTER,SLAVE; Synchronous and asynchronous representations Master and Slave The mechanism of data synchronization between ;
brokerRole = ASYNC_MASTER
# Brush strategy , The value is :ASYNC_FLUSH,SYNC_FLUSH Represents synchronous disk brushing and asynchronous disk brushing ;SYNC_FLUSH After the message is written to disk, the success status is returned ,ASYNC_FLUSH Unwanted ;
flushDiskType = ASYNC_FLUSH
# Set up broker The server where the node is located ip Address
brokerIP1 =

start-up broker

docker run -d --restart=always --name rmqbroker --link rmqnamesrv:namesrv -p 10911:10911 -p 10909:10909 -v D:\download\docker\rocketmq\broker\logs:/root/logs -v D:\download\docker\rocketmq\broker\store:/root/store -v D:\download\docker\rocketmq\broker\broker.conf:/opt/rocketmq-4.4.0/conf/broker.conf -e "NAMESRV_ADDR=namesrv:9876" -e "MAX_POSSIBLE_HEAP=200000000" rocketmqinc/rocketmq sh mqbroker -c /opt/rocketmq-4.4.0/conf/broker.conf

4、 Install the visual management platform rocketmq-console-ng

rocketmq-console-ng yes rocketmq Visual management platform for

Pull the mirror image


start-up ,namesrv.addr The address should point to the... We installed mqnamesrv Server IP

docker run -d --restart=always --name rmqadmin -e "JAVA_OPTS=-Drocketmq.namesrv.addr= -Dcom.rocketmq.sendMessageWithVIPChannel=false" -p 9999:8080 pangliang/rocketmq-console-ng

Browser input installation IP:9999 Can access


title :docker install rocketmq
author : wenyl
Address :

Please bring the original link to reprint ,thank
Similar articles