GitHub user zergduan edited a comment on the discussion: RocketMQ5 
广播消费的消费组消费进度的Diff Total数据将无限变大?


https://github.com/apache/rocketmq/wiki/RIP-48-Enhance-server-side-offset-management-ability
 中提到以下内容:
RocketMQ's broadcast mode means that messages are subscribed to all client 
which belong to a single consumer group, and is generally used to clear the 
cache or build the cache on the client for business logic. In the original 
design, if the local offset does not exist, the client cannot consume messages 
within the restart interval because the client starts to consume from the 
max(latest) offset after application restarting. **We introduce a feature to 
avoid this situation by using the minimum consumption offset of all clients as 
the offset of this consumer group in broadcast mode**.

我想请教2个问题:

以下是我的个人理解,请问是否正确?
按照这个文档的描述当前RocketMQ版本中引入了一个新的机制,当一个消费组开始广播消费时,这个起始点的offset就被记录到消费组中,以确保当某一个广播消费者发生重启后可以重新消费在重启期间发布的消息(在以前的版本中,广播消费者重启只能继续消费重启后发布的消息,重启期间发布的消息无法被消费)

在这种机制下,一个消费组如果发生了广播消费,则这个消费组会以这个广播消费开始的offset记录消费进度中的 Diff/Delay 
信息,也就是说只要这个消费组发生过广播消费,通过mqadmin consumerProgress查看到的 Diff 
Total就会随着消息的发布而无限增长,如果想让Diff/Delay归零必须要发生以下两种情况:
a. 手动reset这个消费组的消费进度
b. 这个消费组停止广播消费并发生一次集群消费(这个集群消费会将Diff/Delay中的所有消息重新消费一遍)
如果不手动reset消费进度,或则改为集群消费,这个Diff/Delay信息将越来越大,难道不会出现数据溢出的问题么?

GitHub link: 
https://github.com/apache/rocketmq/discussions/9405#discussioncomment-13139169

----
This is an automatically sent email for dev@rocketmq.apache.org.
To unsubscribe, please send an email to: dev-unsubscr...@rocketmq.apache.org

Reply via email to