Help Center/ Distributed Message Service for Kafka/ FAQs/ Consumer Groups/ Will a Consumer Group Without Active Consumers Be Automatically Deleted in 14 Days?
Updated on 2024-12-16 GMT+08:00

Will a Consumer Group Without Active Consumers Be Automatically Deleted in 14 Days?

This depends on the offsets.retention.minutes and auto.create.groups.enable parameters.

  • For instances created before Apr 25, 2023, auto.create.groups.enable is set to true by default. offsets.retention.minutes determines how long before a consumer group is deleted automatically, which can be changed on the console. For details, see Modifying Kafka Instance Configuration Parameters.
  • For instances created on or after Apr 25, 2023:
    • If auto.create.groups.enable is false, you need to manually delete consumer groups.

      If auto.create.groups.enable is set to false for a Kafka instance created before Feb 5, 2024, and an empty consumer group subscribed to only one topic, deleting the topic also removes the consumer group.

    • If auto.create.groups.enable is true, a consumer group that has never committed an offset will be automatically deleted after 10 minutes.
    • If auto.create.groups.enable is true, and a consumer group that has committed an offset, offsets.retention.minutes determines how long before the group is deleted automatically, which can be changed on the console. For details, see Modifying Kafka Instance Configuration Parameters.

Kafka uses the offsets.retention.minutes parameter to control how long to keep offsets for a consumer group. If offsets are not committed within this period, they will be deleted. If Kafka determines that there are no active consumers in a consumer group (for example, when the consumer group is empty) and there are no offsets, Kafka will delete the consumer group.