consumer.seekToBeginning / seekToEnd evaluates lazily, and hence you have to call poll in order to really update the fetching position. The first record's offset would then be the starting offset.
Guozhang On Mon, Mar 7, 2016 at 4:53 AM, Giidox <a...@marmelandia.com> wrote: > Excellent, many thanks! > > With “auto.offset.reset” as “none”, I get OffsetOutOfRangeException, which > is what I want. > > To find out how many messages the client I had missed, I called > consumer.seekToBeginning and consumer.position (without calling poll). Is > this a correct way to find out the first available offset? > > Best regards, > > Giidox > > > -- -- Guozhang