kafka-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dana Powers <dana.pow...@gmail.com>
Subject Re: "Close the consumer, waiting indefinitely for any needed cleanup."
Date Mon, 11 Apr 2016 20:08:52 GMT
Not a typo. This happens because the consumer closes the coordinator,
and the coordinator attempts to commit any pending offsets
synchronously in order to avoid duplicate message delivery. The
Coordinator method commitOffsetsSync will retry indefinitely unless a
non-recoverable error is encountered. If you wanted to implement a
timeout, you'd need to wire it up in commitOffsetsSync and plumb the
timeout from Coordinator.close() and Consumer.close(). It doesn't look
terribly complicated, but you should check on the dev list for more
opinions.

-Dana

On Mon, Apr 11, 2016 at 12:45 PM, Oleg Zhurakousky
<ozhurakousky@hortonworks.com> wrote:
> The subject line is from the javadoc of the new KafkaConsumer.
> Is this for real? I mean I am hoping the use of ‘indefinitely' is a typo.
> In any event if it is indeed true, how does one break out of indefinitely blocking consumer.close()
invocation?
>
> Cheers
> Oleg

Mime
View raw message