本地测试,快速搭建环境比较看
1.下载镜像
https://dev.aliyun.com/detail.html?spm=5176.1972343.2.172.8a305aaaJG1yRZ&repoId=194373
docker pull registry.cn-hangzhou.aliyuncs.com/laizhenwei/rocketmq:4.2.0
从上面地址下载镜像
2.docker-compose启动
version: '2'
services:
rocketmq:
image: registry.cn-hangzhou.aliyuncs.com/laizhenwei/rocketmq:4.2.0
ports:
- "9876:9876"
- "10909:10909"
- "10911:10911"
environment:
- "brokerIP1=本地ip"
volumes:
- '/Users/userName/data/rocketmq/store:/usr/local/rocketmq/store'
docker-compose up -d
3.rocketmq-console
使用docker搭建rocketmq-console,界面控制台
version: '2'
services:
rocketmq-console:
image: registry.cn-hangzhou.aliyuncs.com/aluomaidi/rocketmq-console-ng:1.0.0
ports:
- "32773:8080"
environment:
- "JAVA_OPTS=-Drocketmq.namesrv.addr=xxx.xxx.xxx.xxx:9876 -Dcom.rocketmq.sendMessageWithVIPChannel=false"
用docker搭建环境就是这么无脑简单