Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit ee6029b

Browse files
Merge pull request Snailclimb#1258 from daniubi/patch-1
2.1.7 消息的 push 实现--补充
2 parents 5854bb9 + 0654537 commit ee6029b

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎docs/system-design/distributed-system/message-queue/RocketMQ-Questions.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,8 @@ class Broker {
172172

173173
1. 注意,RocketMQ 已经说了自己会有低延迟问题,其中就包括这个消息的 push 延迟问题
174174
2. 因为这并不是真正的将消息主动的推送到消费者,而是 Broker 定时任务每5s将消息推送到消费者
175+
3. pull模式需要我们手动调用consumer拉消息,而push模式则只需要我们提供一个listener即可实现对消息的监听,而实际上,RocketMQ的push模式是基于pull模式实现的,它没有实现真正的push。
176+
4. push方式里,consumer把轮询过程封装了,并注册MessageListener监听器,取到消息后,唤醒MessageListener的consumeMessage()来消费,对用户而言,感觉消息是被推送过来的。
175177

176178
### 2.1.8 消息重复发送的避免
177179

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /