mirror of
https://github.com/CyC2018/Interview-Notebook.git
synced 2026-10-28 22:53:47 +00:00
Update 消息队列.md
补充消费者组与分区分配的示意图。
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 104 KiB |
@@ -34,6 +34,8 @@
|
||||
|
||||
Kafka、RocketMQ 等通过消费者组把两种模型结合起来:一条消息会发送给每个订阅它的消费者组,但在一个消费者组内只会被一个消费者消费。
|
||||
|
||||
<div align="center"> <img src="pics/consumer-group.png" width="560px"/> </div><br>
|
||||
|
||||
发布与订阅模式和观察者模式有以下不同:
|
||||
|
||||
- 观察者模式中,观察者和主题都知道对方的存在;而在发布与订阅模式中,生产者与消费者不知道对方的存在,它们之间通过频道进行通信。
|
||||
|
||||
Reference in New Issue
Block a user