1、rocketMQ 安裝使用
阿新 • • 發佈:2022-02-21
RocketMQ 安裝
獲取映象
docker pull foxiswho/rocketmq:server-4.3.2 docker pull foxiswho/rocketmq:broker-4.3.2
建立掛載目錄
mkdir -p /d/mqserver/logs mkdir -p /d/mqserver/store mkdir -p /d/mqbroker/logs mkdir -p /d/mqbroker/store mkdir -p /d/mqbroker/conf
建立配置檔案/d/mqbroker/conf/broker.conf
namesrvAddr=172.31.224.1:9876 brokerClusterName= DefaultCluster brokerName = broker-a brokerId = 0 deleteWhen = 04 fileReservedTime = 48 brokerRole = ASYNC_MASTER flushDiskType = ASYNC_FLUSH brokerIP1 = 192.168.130.128 listenPort=10911
啟動 server 容器
docker run -it -d --name mqserver -p 9876:9876 -e "JAVA_OPT_EXT=-server -Xms128m -Xmx128m -Xmn128m"-e "JAVA_OPTS=-Duser.home=/opt" -v d:\mqserver\logs:/opt/logs -v d:\mqserver/store:/opt/store foxiswho/rocketmq:server-4.3.2
啟動 broker 容器
docker run -d -p 10911:10911 -p 10909:10909 --name mqbroker -e "JAVA_OPT_EXT=-server -Xms128m -Xmx128m -Xmn128m" -e "JAVA_OPTS=-Duser.home=/opt" -v d:\mqbroker\conf\broker.conf:/etc/rocketmq/broker.conf -v d:\mqbroker\logs:/opt/logs -v d:\mqbroker\store:/opt/store --privileged=truefoxiswho/rocketmq:broker-4.3.2
RocketMQ 管理工具安裝
獲取映象
docker pull styletang/rocketmq-console-ng:1.0.0
啟動 mqconsole 容器
docker run -it -d --name mqconsole -e "JAVA_OPTS=-Drocketmq.namesrv.addr=172.31.224.1:9876 -Dcom.rocketmq.sendMessageWithVIPChannel=false" -p 8080:8080 -t styletang/rocketmq-console-ng:1.0.0
啟動管理工具