安装
https://blog.csdn.net/weixin_40533111/article/details/84451096
事务消息
官方下载地址:https://www.apache.org/dyn/closer.cgi?path=rocketmq
官方推荐使用的镜像地址:http://mirror.bit.edu.cn/apache/rocketmq
git clone https://github.com/apache/rocketmq.git
unzip rocketmq-all-4.2.0-source-release.zip
cd rocketmq-all-4.2.0/
mvn -Prelease-all -DskipTests clean install -U
cd distribution/target/apache-rocketmq
#添加环境变量
变量名:ROCKETMQ_HOME
变量值:user_path\distribution\target\apache-rocketmq
#启动 NameServer
window中命令:start mqnamesrv.cmd
linux中命令nohup sh bin/mqnamesrv &
tail -f ~/logs/rocketmqlogs/namesrv.log
#启动BROKER
window中命令:start mqbroker.cmd -n localhost:9876
linux中命令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
sh bin/mqshutdown broker //停止 broker
sh bin/mqshutdown namesrv //停止 nameserver
查看集群情况 ./mqadmin clusterList -n 127.0.0.1:9876
查看 broker 状态 ./mqadmin brokerStatus -n 127.0.0.1:9876 -b 172.20.1.138:10911 (注意换成你的 broker 地址)
查看 topic 列表 ./mqadmin topicList -n 127.0.0.1:9876
查看 topic 状态 ./mqadmin topicStatus -n 127.0.0.1:9876 -t MyTopic (换成你想查询的 topic)
查看 topic 路由 ./mqadmin topicRoute -n 127.0.0.1:9876 -t MyTopic
Spring Boot系列文章(六):SpringBoot RocketMQ 整合使用和监控
对RocketMQ的见解以及与SpringBoot集成和配置可视化控制台
监控
http://www.54tianzhisheng.cn/2018/02/07/SpringBoot-RocketMQ/
git clone https://github.com/apache/rocketmq-externals.git
cd rocketmq-externals/rocketmq-console/
#修改配置文件 rocketmq-console\src\main\resources\application.properties
rocketmq.config.namesrvAddr=localhost:9876
#如果你 rocketmq 版本小于 3.5.8 才需设置 `rocketmq.config.isVIPChannel` 为 false,默认是 true, 这个可以在源码中可以看到的
rocketmq.config.isVIPChannel=
#运行
mvn spring-boot:run
#或者
mvn clean package -Dmaven.test.skip=true
java -jar target/rocketmq-console-ng-1.0.0.jar
#访问
http://localhost:8080/
Rocketmq原理&最佳实践
分布式事务
https://segmentfault.com/a/1190000012762869
深入浅出RocketMQ
Rocketmq原理&最佳实践
RocketMQ吐血总结
rocketMq中文文档
整合
RocketMQ——ack机制保证消费成功
Spring Boot + RabbitMQ死信机制实现延迟队列
https://github.com/apache/rocketmq-spring/blob/master/README_zh_CN.md