For Fluffka, I created a wrapping function:
IterStatus timedHasNext() {
try {
long startTime = System.currentTimeMillis();
it.hasNext();
long endTime = System.currentTimeMillis();
return new IterStatus(true,endTime-startTime);
} catch (ConsumerTimeoutException e)
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 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