rocketMq实战(5)-本地调试broker源码

源码下载地址: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成功如下

 
 
 

猜你喜欢

转载自chenchangqun.iteye.com/blog/2345106