rocketMq实战(5)-本地调试broker源码 博客分类: rocketmq rocketmqdebug
程序员文章站
2024-03-17 19:16:40
...
源码下载地址:https://github.com/alibaba/RocketMQ
配置好的项目如下图
broker 的启动类 : com.alibaba.rocketmq.broker.BrokerStartup
broker启动 需要加载配置文件,如下
broker-c.properties
brokerClusterName=DefaultCluster
brokerName=broker-c
brokerId=0
listenPort=10911
deleteWhen=04
fileReservedTime=48
brokerRole=ASYNC_MASTER
flushDiskType=ASYNC_FLUSH
配置debug Application
参数配置如图
-n "10.103.16.77:9876;10.103.16.15:9876" -c E:/work_file/RocketMq/r-config/broker-c.properties
运行 遇到以下问题
"Please set the ROCKETMQ_HOME variable in your environment to match the location of the RocketMQ installation"
原因是 没有获取到 ROCKETMQ_HOME,set相应的目录即可
BrokerStartup:
debug成功如下