Details
-
Improvement
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
0.9.0.0
Description
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:
consumer.commitSync(Collections.singletonMap(record.partition(), new
OffsetAndMetadata(record.offset() + 1)));
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.