Skip to content

[Bug] PopBufferMergeService 消息订阅者关系被移除 #9318

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

Open
3 tasks done
MarvinYu opened this issue Apr 7, 2025 · 0 comments
Open
3 tasks done

[Bug] PopBufferMergeService 消息订阅者关系被移除 #9318

MarvinYu opened this issue Apr 7, 2025 · 0 comments

Comments

@MarvinYu
Copy link

MarvinYu commented Apr 7, 2025

Before Creating the Bug Report

  • I found a bug, not just asking a question, which should be created in GitHub Discussions.

  • I have searched the GitHub Issues and GitHub Discussions of this repository and believe that this is not a duplicate.

  • I have confirmed that this bug belongs to the current repository, not other repositories of RocketMQ.

Runtime platform environment

Linux or other

RocketMQ version

= 5.0.0

JDK Version

No response

Describe the Bug

PopBufferMergeService#scanGarbage 代码

if (System.currentTimeMillis() - entry.getValue().getTime() > minute5) {
    POP_LOGGER.info("[PopBuffer]remove long time not used sub {} of topic {} in buffer!", cid, topic);
    iterator.remove();
    continue;
}

对于一些开发和测试环境而言,因为消息比较少,topic与消费者订阅关系很容易被移除,然后出现消费者消息出现skip的情况。

Steps to Reproduce

消息发送者一天发送了5条消息,但是最终消费者只消费到其中三条

What Did You Expect to See?

消费者消息不丢失

What Did You See Instead?

消费者消息不丢失

Additional Context

No response

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

1 participant