[
https://issues.apache.org/jira/browse/KAFKA-3230?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15143231#comment-15143231
]
Craig W commented on KAFKA-3230:
--------------------------------
So the problem appears to be on my misunderstanding of committing offsets. If I
got a message for topic foo, partition 0, offset 1 (aka "foo-0 1"), I would do
whatever processing I needed for that message and then I would call commitSync
with "foo-0 1". However, it seems I should've committed "foo-0 2"! When
committing an offset that's +1 over what I processed, it works as expected.
Am I correct that when committing offsets you need to commit an offset number
that's +1 over the message that was processed? Meaning:
get message from "foo", gets back "foo-0 1"
do work
commitSync("foo-0 2")
> Unable to commit offsets if partition is paused
> -----------------------------------------------
>
> Key: KAFKA-3230
> URL: https://issues.apache.org/jira/browse/KAFKA-3230
> Project: Kafka
> Issue Type: Bug
> Components: clients
> Affects Versions: 0.9.0.0
> Reporter: Craig W
>
> If I pause a topic partition, then try to
> [commitSync(java.util.Map<TopicPartition,OffsetAndMetadata>
> offsets)|http://kafka.apache.org/090/javadoc/org/apache/kafka/clients/consumer/KafkaConsumer.html#commitSync(java.util.Map)]
> to that partition, no error is thrown and the offset does not actually get
> committed.
> It seems I have to resume before being able to commit offsets. This behavior
> is unexpected, at least based on the documentation.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)