There isn't a very clean way to do this in the 0.8.x high level consumer. You can configure consumer.timeout.ms to a certain value so that the consumer's blocking iterator returns if no message arrives for consumer.timeout.ms.
Thanks Neha On Mon, Sep 15, 2014 at 6:33 AM, Ivan Balashov <ibalas...@gmail.com> wrote: > Hi, > > Is it possible to read all available messages with HLC in a > non-blocking way? E.g. read all messages and not wait for more > messages to appear in the topic. > > As far as I understand, currently one has to keep high-level consumer > in a separate thread until it is shut down explicitly, but how can one > check if all available messages are in fact consumed? > > Thanks, >