You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "RivenSun (Jira)" <ji...@apache.org> on 2022/04/10 01:19:00 UTC

[jira] [Created] (KAFKA-13814) Improve documentation of KafkaConsumer's group.id parameter

RivenSun created KAFKA-13814:
--------------------------------

             Summary: Improve documentation of KafkaConsumer's group.id parameter
                 Key: KAFKA-13814
                 URL: https://issues.apache.org/jira/browse/KAFKA-13814
             Project: Kafka
          Issue Type: Improvement
          Components: documentation
            Reporter: RivenSun


With KIP-289 and `GroupCoordinator.isValidGroupId(...)` method, we can conclude that for KafkaConsumer:
1. For consumers using the group management mechanism, `group.id` must be non-null and non-empty string
2. `group.id` can be set to empty string only in assign mode

[https://kafka.apache.org/documentation/#consumerconfigs_group.id]
So I suggest improving the parameter documentation as follows:

A unique string that identifies the consumer group this consumer belongs to. This property is required if the consumer uses either the group management functionality by using {{subscribe(topic)}} or the Kafka-based offset management strategy.

->

A unique string that identifies the consumer group this consumer belongs to. This property is required if the consumer uses either the group management functionality by using {{subscribe(topic)}} or the Kafka-based offset management strategy, *the value must be a non-null and non-empty string.* *`group.id` can be set to an empty string only the consumer uses {{assign(topic).}}*



--
This message was sent by Atlassian Jira
(v8.20.1#820001)