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

Disable auto offset commit in ConsoleConsumer if no group is provided

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      In ConsoleCosnumer, if no group is provided, we generate a random groupId:

      consumerProps.put(ConsumerConfig.GROUP_ID_CONFIG, s"console-consumer-${new Random().nextInt(100000)}")
      

      In this case, since the group is not likely to be used again, we should disable automatic offset commits. This avoids polluting the coordinator cache with offsets that will never be used.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                vahid Vahid Hashemian
                Reporter:
                hachikuji Jason Gustafson
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: