I am using consumer.timeout.ms to force a consumer jump out hasNext call,
which will throw ConsumerTimeoutException.
Yes, this is the downside of the blocking iterator approach. If you want to
pull data in batches and process messages, the iterator is not the best API
as it can block at any time longer than your app is comfortable with. To
fix this and a bunch of other problems with the consumer API, we are
working on a new consumer client, that will replace the existing one and
will support completely new APIs.
Take a look at the new APIs here
Let us know if you have feedback.
On Tue, Aug 12, 2014 at 4:37 PM, Guozhang Wang <[EMAIL PROTECTED]> wrote: