Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-13814

Improve documentation of KafkaConsumer's group.id parameter

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • documentation
    • None

    Description

      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).

      Attachments

        Activity

          People

            Unassigned Unassigned
            RivenSun RivenSun
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: