Hello, 1) When the fetch offset is out of range, broker will send back the corresponding error code and the new consumer should reset its offset automatically according to the reset policy (config "auto.offset.reset"), by default it is set to "latest", i.e. then log end offset. If you do not have any new messages coming in then consumer will not return anything.
Try set the config to "earliest" to start from log start offset and see if there is any messages returned from poll(). 2) We are planning to gradually deprecate the old consumer APIs, but it is still under discussion which release we will mark it as deprecated and the new consumer API as "stable". Guozhang On Wed, Mar 2, 2016 at 4:15 AM, Giidox <a...@marmelandia.com> wrote: > Hi all! > > I am using the new consumer API by manually assigning partitions. I’m > having some trouble with seek. > > When I seek with a valid offset, poll works ok. However, if I call seek > with an offset that is so small that the broker no longer has that offset, > poll returns no records. Is there a way to get a callback or exception for > seeking to an invalid offset? Is there a way to discover what the valid > offset range is, with the new consumer? > > Is the old consumer API deprecated (or is it planned to be deprecated)? > > Any help is much appreciated. > > - Giidox > > -- -- Guozhang