[ 
https://issues.apache.org/jira/browse/KAFKA-3191?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15128856#comment-15128856
 ] 

ASF GitHub Bot commented on KAFKA-3191:
---------------------------------------

GitHub user kunickiaj opened a pull request:

    https://github.com/apache/kafka/pull/850

    KAFKA-3191: Improve offset committing JavaDoc in KafkaConsumer

    Added an example clarifying the correct way to use explicit offsets with 
commitSync().

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/kunickiaj/kafka KAFKA-3191

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/kafka/pull/850.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 #850
    
----
commit 72705b19bee5c4ac0ef1428229c261bf6ed38490
Author: Adam Kunicki <a...@streamsets.com>
Date:   2016-02-02T19:28:54Z

    KAFKA-3191: Improve offset committing JavaDoc in KafkaConsumer

----


> Improve offset committing JavaDoc in KafkaConsumer
> --------------------------------------------------
>
>                 Key: KAFKA-3191
>                 URL: https://issues.apache.org/jira/browse/KAFKA-3191
>             Project: Kafka
>          Issue Type: Improvement
>          Components: consumer
>    Affects Versions: 0.9.0.0
>            Reporter: Adam Kunicki
>            Assignee: Adam Kunicki
>            Priority: Minor
>              Labels: documentation
>
> http://www.confluent.io/blog/tutorial-getting-started-with-the-new-apache-kafka-0.9-consumer-client
>  includes some great examples of how to manage offset commits in Kafka 0.9.
> It is currently unclear from the JavaDoc that the following is expected:
> {code}
> consumer.commitSync(Collections.singletonMap(record.partition(), new
> OffsetAndMetadata(record.offset() + 1)));
> {code}
> The committed offset should always be the offset of the next message that
> your application will read.
> This information should be incorporated into the existing JavaDoc to make it 
> clearer.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to