rocketmq
rocketmq copied to clipboard
[Bug] PopBufferMergeService 消息订阅者关系被移除
Before Creating the Bug Report
-
[x] I found a bug, not just asking a question, which should be created in GitHub Discussions.
-
[x] I have searched the GitHub Issues and GitHub Discussions of this repository and believe that this is not a duplicate.
-
[x] 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