Reset Offsets for Consumer Groups
You can reset offsets for consumer groups. Offsets track the position of a consumer in a partition. Each consumer instance in a consumer group periodically commits its progress through the partition with an offset. If a consumer instance fails, another instance in the group takes over and resumes from the last committed offset.
You might need to reset offsets for a variety of reasons, including troubleshooting, testing or disaster recovery.
- Considerations:
To reset offsets with Control Center, you must first empty the consumer group by stopping any clients or consumers in the consumer group.
To reset offsets with Control Center for a consumer group that uses the Apache Kafka®
assign()function to manually assign consumers to partitions, you must first locate and pause the consumer that is using theassign()function. Consumer groups that use theassign()function always appear empty to Control Center but they may hide unstopped consumers.You should not use Control Center to reset offsets for stream processing applications, which require special considerations for resets. For more information, see Reset Kafka Streams Applications in Confluent Platform.
Prerequisites
You must be a member of one of the following roles:
super.user
SystemAdmin
ClusterAdmin
Reset offsets for consumer groups
To reset offsets for consumer groups, use the following procedure.
To reset an offset
Select your cluster name.
Select Consumers and then select Consumer Lag. A list of consumer group IDs is displayed.
Select a consumer group ID. A list of clients and consumers is displayed.
Select the client or consumer you want to reset, or select all.
Select Reset offset. The Reset offset dialog appears.
In Reset offset, choose one of the following and then select Reset:
Earliest to set the offset to the earliest offset available for the topic and partition.
Latest to set the offset to the latest offset available for the topic and partition.
Offset value and add a value in Enter offset value to set the offset to a specified integer.
After you reset an offset, Control Center may need a few minutes to catch up.