相关概念
二代mq, 纯java开发,和kafka无本质区别
安装测试
# 下载 4.8.0
wget https://downloads.apache.org/rocketmq/4.8.0/rocketmq-all-4.8.0-bin-release.zip
unzip rocketmq-all-4.8.0-bin-release.zip
#运行命名服务, 替代kafka的zk
nohup sh bin/mqnamesrv &
#查看日志
tail -f ~/logs/rocketmqlogs/namesrv.log
#运行broker
nohup sh bin/mqbroker -n localhost:9876 &
#查看日志
tail -f ~/logs/rocketmqlogs/broker.log
# 发送消息
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