• 请不要在回答技术问题时复制粘贴 AI 生成的内容
aimaodeyuer
V2EX  ›  程序员

rocket mq 老消费者组从头消费消息导致消息积压

  •  
  •   aimaodeyuer · Apr 15, 2020 · 1251 views
    This topic created in 2262 days ago, the information mentioned may be changed or developed.

    背景: 老 topic,8 个队列,无扩容,老 consumerGroup 。

    追踪源码后有如下结果: 1.没有找到 consumerGroup 对应的 queue 的消费进度( offset ),于是从 broker 中获取最小偏移量,若( minoffset )<=0 并且消息还存在内存中则返回 0,从 0 开始读取消息;

    对于 topic 新的定义(消息在内存中没有入磁盘?): topic 第一条消息所在的 commitlog 还没被清理过,并且 topic 的第一个索引文件也没清理过,那么 rocketmq 会认为这个消息队列消息量不大,可以从头进行消费。

    疑问: 消费进度是针对于 consumerGroup 和 queue,按道理老的 consumerGroup 的 queue 消费进度会有啊,为什么重新发布就从头消费了。 遇到过这问题的老哥指点下。

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3111 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 14:21 · PVG 22:21 · LAX 07:21 · JFK 10:21
    ♥ Do have faith in what you're doing.