Are you using compressed messages? If so, when using SimpleConsumer, it's possible for you to see messages whose offset is smaller than the offset in the fetch request, if those messages are in the same compressed batch. It's the responsibility of the client to skip over those messages. Note that the high level consumer handles that logic already.
Thanks, Jun On Wed, Nov 11, 2015 at 12:40 AM, Stevo Slavić <ssla...@gmail.com> wrote: > Hello Apache Kafka community, > > > I'm using simple consumer with Kafka 0.8.2.2 and noticed that under some > conditions fetch response message set for a partition can contain at least > one (if not all) MessageAndOffset with nextOffset being equal to current > (committed) offset, offset used in fetch request. Not sure how it's related > but I could notice this behavior especially often when I was using new > async producer, and when fetch request was able to fetch several messages > all the way to the end of the partition. > > Is this a feature or a bug? > > > Kind regards, > > Stevo Slavic. >