Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pika sub/pub 命令支持消费历史消息 #1581

Closed
luky116 opened this issue Jun 3, 2023 · 0 comments
Closed

pika sub/pub 命令支持消费历史消息 #1581

luky116 opened this issue Jun 3, 2023 · 0 comments

Comments

@luky116
Copy link
Collaborator

luky116 commented Jun 3, 2023

当前 pika 的 pub 不能消费到历史的数据,假如 client 端网络发生抖动,可能会存在漏消费消息的情况。希望 pub 能支持消费历史的消息。
思路如下:

  1. pub 的消息,会暂存在一个队列中,每个消息有一个 id 属性,会自动递增;
  2. client 每消费一个消息,都会记录最后一次消费到的消息的id;
  3. pika server 每次会将 client 未消费到的全部消息,都推送给 client 端
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants