File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
docs/system-design/distributed-system/message-queue Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ Kafka 主要有两大应用场景:
36
36
37
37
#### 队列模型:早期的消息模型
38
38
39
- ![ ] ( https://my-blog-to-use.oss-cn-beijing.aliyuncs.com/2019-11/队列模型23.png )
39
+ ![ 队列模型 ] ( https://my-blog-to-use.oss-cn-beijing.aliyuncs.com/2019-11/队列模型23.png )
40
40
41
41
** 使用队列(Queue)作为消息通信载体,满足生产者与消费者模式,一条消息只能被一个消费者使用,未被消费的消息在队列中保留直到被消费或超时。** 比如:我们生产者发送 100 条消息的话,两个消费者来消费一般情况下两个消费者会按照消息发送的顺序各自消费一半(也就是你一个我一个的消费。)
42
42
@@ -50,7 +50,7 @@ Kafka 主要有两大应用场景:
50
50
51
51
发布-订阅模型主要是为了解决队列模型存在的问题。
52
52
53
- ![ ] ( https://my -blog-to-use .oss-cn-beijing .aliyuncs.com/2019-11/广播模型21312 .png )
53
+ ![ 发布订阅模型 ] ( https://guide -blog-images .oss-cn-shenzhen .aliyuncs.com/java-guide-blog/%E5%8F%91%E5%B8%83%E8%AE%A2%E9%98%85%E6%A8%A1%E5%9E%8B .png )
54
54
55
55
发布订阅模型(Pub-Sub) 使用** 主题(Topic)** 作为消息通信载体,类似于** 广播模式** ;发布者发布一条消息,该消息通过主题传递给所有的订阅者,** 在一条消息广播之后才订阅的用户则是收不到该条消息的** 。
56
56
You can’t perform that action at this time.
0 commit comments