rocketmq-externals是rocketmq的可视化控制台,搭建步骤:

  1. 下载代码
git clone https://github.com/apache/rocketmq-externals.git
  1. 修改配置,找到rocketmq-console/src/main/resources/application.properties

    修改端口号:

    # console端口
    server.port=8080
    # name server地址
    # 也可以不修改,在启动完console后,在控制台导航栏 - 运维 - NameSvrAddrList一栏设置
    rocketmq.config.namesrvAddr=localhost:9876
    
  2. 找到 pom.xml,修改依赖

    <rocketmq.version>你的RocketMQ版本</rocketmq.version>
    
  3. 修改代码

    DefaultMQPullConsumer consumer = new DefaultMQPullConsumer(MixAll.TOOLS_CONSUMER_GROUP, null);
    

    改为

    RPCHook rpcHook = null;
    DefaultMQPullConsumer consumer = new DefaultMQPullConsumer(MixAll.TOOLS_CONSUMER_GROUP, rpcHook);
    
  4. 重新打包

    # 切换到代码根目录
    cd rocketmq-externals
    
    # 切换到控制台目录
    cd rocketmq-console
    
    # 构建
    mvn clean package -DskipTests
    
    
  5. 启动

    java -jar rocketmq-console-ng-1.0.1.jar
    

    访问 http://localhost:8080