[ https://issues.apache.org/jira/browse/KAFKA-5327?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16025743#comment-16025743 ]
ASF GitHub Bot commented on KAFKA-5327: --------------------------------------- GitHub user amethystic opened a pull request: https://github.com/apache/kafka/pull/3148 KAFKA-5327: ConsoleConsumer explicitly set `max.poll.records`... KAFKA-5327: ConsoleConsumer explicitly set `max.poll.records` if `--max-messages` is set. You can merge this pull request into a Git repository by running: $ git pull https://github.com/amethystic/kafka KAFKA-5327_ConsoleConsumer_distable_autocommit Alternatively you can review and apply these changes as the patch at: https://github.com/apache/kafka/pull/3148.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #3148 ---- commit fc884eb0bd9940c3914df5e74eae25ff12bb14b9 Author: amethystic <huxi...@hotmail.com> Date: 2017-05-26T03:12:17Z KAFKA-5327: ConsoleConsumer explicitly set `max.poll.records` if `--max-messages` is set. ---- > Console Consumer should only poll for up to max messages > -------------------------------------------------------- > > Key: KAFKA-5327 > URL: https://issues.apache.org/jira/browse/KAFKA-5327 > Project: Kafka > Issue Type: Improvement > Components: tools > Reporter: Dustin Cote > Assignee: huxi > Priority: Minor > > 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. -- This message was sent by Atlassian JIRA (v6.3.15#6346)