RocketMQ环境搭建

RocketMQ 环境搭建

[TOC]

下载

Release Notes – Apache RocketMQ – Version 4.5.2

快速入门

Quick Start

启动 nameserver 和 broker

unzip rocketmq.zip
cd rocketmq/
nohup sh bin/mqnamesrv &
nohup sh bin/mqbroker -n localhost:9876 &

配置外网访问

conf
文件夹下修改 broker.conf
添加

namesrvAddr = xx.xx.xx.xx:9876;xx.xx.xx.xx:9876 # (多个地址以;分隔)
brokerIP1 = xx.xx.xx.xx
enablePropertyFilter = true

启动 namesrv

nohup mqnamesrv &

启动 broker

nohup mqbroker -n xx.xx.xx.xx:9876 autoCreateTopicEnable=true -c /usr/local/rocketmq/conf/broker.conf &

### 测试生成消费

export NAMESRV_ADDR=localhost:9876

sh bin/tools.sh org.apache.rocketmq.example.quickstart.Producer

sh bin/tools.sh org.apache.rocketmq.example.quickstart.Consumer

### 关闭 nameserver 和 broker

sh bin/mqshutdown broker

sh bin/mqshutdown namesrv

## RocketMQ 可视化工具
[GitHub][5]
### Docker 使用方式

docker run -e “JAVA_OPTS=-Drocketmq.namesrv.addr=host:9876 -Dcom.rocketmq.sendMessageWithVIPChannel=false” -p 12581:8080 -t styletang/rocketmq-console-ng

## 参考
1. [Apache RocketMQ Quick Start][2]
2. [阿里云服务器 RocketMQ 外网访,JAVA 服务连接不上问题][4]
[1]: https://rocketmq.apache.org/release_notes/release-notes-4.5.2/
[2]: https://rocketmq.apache.org/docs/quick-start/
[4]: https://blog.csdn.net/hekf2010/article/details/81080755
[5]: https://github.com/apache/rocketmq-externals/tree/master/rocketmq-console
SegmentFault博客
我还没有学会写个人说明!
上一篇

赛博朋克这么火,如果与Python结合,能有多酷?

下一篇

.Net 常用ORM框架对比:EF Core、FreeSql、SqlSuger

你也可能喜欢

评论已经被关闭。

插入图片