- 应用解耦
- 流量削锋
- 数据分发
可用性降低、MQ 宕机影响业务、系统复杂度提高(重复消费、消息丢失、消息顺序性)、一致性问题
配置(默认端口 9876)
./mqnamesrv &
broker 的默认端口是 10911
./mqbroker -n localhost:9876 -c ../conf/broker.conf autoCreateTopicEnable=true &
./mqshutdown namesrv
./mqshutdown broker
Before sending/receiving messages, we need to tell clients the location of name servers. RocketMQ provides multiple ways to achieve this. For simplicity, we use environment variable
NAMESRV_ADDR
> export NAMESRV_ADDR=localhost:9876
> sh bin/tools.sh org.apache.rocketmq.example.quickstart.Producer
SendResult [sendStatus=SEND_OK, msgId= ...
> sh bin/tools.sh org.apache.rocketmq.example.quickstart.Consumer
ConsumeMessageThread_%d Receive New Messages: [MessageExt...
- 配置环境变量
export NAMESRV_ADDR=localhost:9876
- 生产消息
./tools.sh org.apache.rocketmq.example.quickstart.Producer
- 消费消息
./tools.sh org.apache.rocketmq.example.quickstart.Consumer
Spring Cloud Stream RocketMQ(一) 消息发送接收初试 Spring Cloud Stream RocketMQ(二) Binder 源码分析 Spring Cloud Stream RocketMQ(三)发送源码分析 Spring Cloud Stream RocketMQ(四)消费源码分析
- RocketMQ官网
- RocketMQ中文官方文档
- RocketMQ部署时遇到的问题
- RocketMQ.2-NameServer是如何启动的
- RocketMQ中broker配置brokcerIP1和brokerIP2的作用
- RocketMQ多端口监听
- 阿里中间件官方博客-十分钟入门RocketMQ
- 《深入理解RocketMQ》- MQ消息的投递机制
- 关于 RocketMQ事务中 提交的2PC 概念
- RocketMQ事务消息学习及刨坑过程
- Spring Cloud Stream
- SpringCloud Stream RockdtMQ Binder Example code
- SpringCloud Alibaba Rocket官方 Github 源码 example
- SpringCloud Stream(消息中间件RocketMQ)作者博客解读
- Spring Cloud Stream 集成 RocketMQ 消息生产发送