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

Console Consumer should only poll for up to max messages

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 2.0.0
    • tools
    • None

    Description

      The ConsoleConsumer has a --max-messages flag that can be used to limit the number of messages consumed. However, the number of records actually consumed is governed by max.poll.records. This means you see one message on the console, but your offset has moved forward a default of 500, which is kind of counterintuitive. It would be good to only commit offsets for messages we have printed to the console.

      Attachments

        Activity

          People

            huxi_2b huxihx
            cotedm Dustin Cote
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: