Reset Offsets for Consumer Groups in Confluent Cloud

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. For more information, see Monitor Kafka Consumer Lag in Confluent Cloud, Test Confluent Cloud Clients, and Optimize and Tune Confluent Cloud Clients.

Considerations:

  • To reset offsets with Cloud Console, you must first empty the consumer group by stopping any clients or consumers in the consumer group.
  • To reset offsets with Cloud Console 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 the assign() function. Consumer groups that use the assign() function always appear empty to Cloud Console but they may hide unstopped consumers.
  • Cloud Console can display up to 1,000 empty consumer groups. If you have more than 1,000 empty consumer groups, you must use the CLI (kafka-consumer-groups.sh) to reset offsets. For more information, see kafka-consumer-groups.sh and Manage Consumer Groups.
  • You should not use Cloud Console 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:

  • Organization Admin
  • Environment Admin
  • Cloud Cluster Admin
  • Resource Owner
  • Developer Read

For more information, see Role-based Access Control (RBAC) on Confluent Cloud and Predefined RBAC Roles on Confluent Cloud.

To reset an offset

  1. Select your cluster name.

  2. Select Clients and then select Consumer Lag. A list of consumer group IDs is displayed.

  3. Select a consumer group ID. A list of clients and consumers is displayed.

  4. Select the client or consumer you want to reset, or select all.

  5. Select Reset offset. The Reset offset dialog appears.

  6. 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, the Cloud Console may need a few minutes to catch up.

For more information on creating a consumer, see Quick Start for Confluent Cloud.