Scenarios
Consumption progress (offset) indicates the message consumption position. In certain scenarios, such as data processing exceptions, logical changes, or operation and maintenance needs, you may need to reset the consumer offset to reconsume or skip specific messages.
Restrictions and Limitations
Resetting the consumption progress may lead to repeated consumption. Proceed with caution.
Prerequisites
CKafka does not support directly resetting the consumption progress when the consumption group is in an active state. Before resetting, stop all consumption activities of the target consumption group. After stopping the consumer client, wait for the server to recognize the consumer as offline (the waiting duration is determined by the ConsumerConfig.SESSION_TIMEOUT_MS_CONFIG parameter, default 1000 ms).
Viewing Consumption Progress
2. Click instance list in the left sidebar. After selecting a region, click the ID of the target instance to go to the instance basic information page.
3. On the instance basic information page, click the Consumer Group tab to view the consumer group list info under the instance.
4. Click the small triangle on the left side of the consumer group name column to view the subscribed Topic and consumption progress info of the group.
Resetting Consumption Progress
2. Click instance list in the left sidebar. After selecting a region, click the ID of the target instance to go to the instance basic information page.
3. On the instance basic information page, click the Consumer Group tab to view the consumer group list info under the instance.
4. Click the offset setting in the Operation column of the target consumption group, then select the reset mode in the offset setting pop-up.
Set by Topic dimension: Reset all partitions of the entire Topic uniformly, suitable for batch reset of consumer offsets and business setting of consumer offsets.
Set by Partition dimension: Reset one or multiple specific partitions of a Topic, suitable for scenarios requiring special processing of partial partitions to eliminate data skew or address specific partition issues.
5. Click Next, then select the objects to reset consumption progress in the dropdown list.
Set by Topic dimension: Select the topics to reset, support multiple selections. Not select will reset offsets for all topics under the instance by default.
Set by Partition dimension: Select the partitions to reset, support multiple selections. Not select will reset offsets for all partitions under the Topic by default.
6. Click Next to specify the offset.
Move the offset to a specified position: Adjust the consumer offset precisely to the designated offset position. The adjustment range is between the minimum offset and maximum offset. If the input position is less than/more than the offset range, it will reset to the minimum/maximum offset position.
Move the offset forward or backward by several positions: Perform a relative move based on the current position. Input a negative number to move forward or a positive number to move backward. The moved position is also limited by the minimum/maximum offset.
Start consuming from the latest/earliest position: Quickly reset the consumption position to the start or end position. Latest means start consuming from new messages (skip ALL backlog of messages); earliest means start consuming from the earliest messages.
Consume position reset by time point: Locate offset based on timestamp, specify time point accurate to second.
7. Click Submit to complete the reset.