1

version: 3.2.6

consumer type: PullConsumer

When a new consumer boots, I will try to fetch the consumer offset from mq:

long offset = pullConsumer.fetchConsumeOffset(mq, true) ;

But I happen to meet that this returns -1, and I saw error:

CODE: 22 Not found, V3_0_6_SNAPSHOT maybe this group consumer boot first

from error log.

JaskeyLam
  • 15,405
  • 21
  • 114
  • 149

1 Answers1

0

This only happens when a totally new consumer group boots with EITHER one of below condition happens:

  1. min offset >0 , indicating that the topic is an old topic/queue, which messages has been deleted before from this queue.

  2. Message which consume offset is 0 is considered that it will be consumed from disk by checkInDiskByCommitOffset, which rocketmq think if you consume from 0, a lot of messages will be consume from disk rather than page cache.

When this happens, client should be responsible to determine where to consume. Propably from 0, but you may suffer from consuming a lot of messages from disk.

JaskeyLam
  • 15,405
  • 21
  • 114
  • 149