kafka-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stevo Slavić <ssla...@gmail.com>
Subject New consumer - offset one gets in poll is not offset one is supposed to commit
Date Fri, 24 Jul 2015 17:11:28 GMT
Hello Apache Kafka community,

Say there is only one topic with single partition and a single message on
Result of calling a poll with new consumer will return ConsumerRecord for
that message and it will have offset of 0.

After processing message, current KafkaConsumer implementation expects one
to commit not offset 0 as processed, but to commit offset 1 - next
offset/position one would like to consume.

Does this sound strange to you as well?

Wondering couldn't this offset+1 handling for next position to read been
done in one place, in KafkaConsumer implementation or broker or whatever,
instead of every user of KafkaConsumer having to do it.

Kind regards,
Stevo Slavic.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message