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

Disable auto offset commit in ConsoleConsumer if no group is provided

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • None
    • None
    • None
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: