-
下载RocketMQ
-
解压 目录结构如下
-
配置环境变量:ROCKETMQ_HOME
-
进入rocketmq解压路径的bin目录
-
cmd命令启动namesrv:
start mqnamesrv.cmd
-
cmd命令启动broker:
start mqbroker.cmd -n 127.0.0.1:9876 autoCreateTopicEnable=true
-
如果之前安装过rocketmq,启动可能会失败:进入到用户目录C:\Users\Administrator,找到store文件夹,删除,重新启动broker,可以成功启动
- 测试RocketMQ
-
启动消费者
set NAMESRV_ADDR=localhost:9876 tools.cmd org.apache.rocketmq.example.quickstart.Consumer
-
启动生产者
set NAMESRV_ADDR=localhost:9876 tools.cmd org.apache.rocketmq.example.quickstart.Producer
-
rocketmq控制台
地址: https://github.com/apache/rocketmq-dashboard修改端口:
编译:
mvn clean package '-Dmaven.test.skip=true'
运行:
java -jar rocketmq-console-ng-1.0.1.jar
浏览器登录控制台:localhost:8080