Wait, actually, why would the thread block forever? I would understand
throwing an error and failing immediately (fail fast) and I would
understand logging an error and blocking for the time they specified (since
that is what they asked for), but the logging an error and putatively
blocking forever if they only specified a wait time of say 15 ms just seems
weird, right? There is no other error condition where we intentionally
block forever as far as I know.

Sorry to keep going around and around on this minor point I just want to
clarify that that is what you mean.

-Jay

On Wed, Mar 25, 2015 at 9:17 AM, Jay Kreps <jay.kr...@gmail.com> wrote:

> +1
>
> -Jay
>
> On Tue, Mar 24, 2015 at 2:43 PM, Guozhang Wang <wangg...@gmail.com> wrote:
>
>> +1.
>>
>> On Tue, Mar 24, 2015 at 2:15 PM, Jiangjie Qin <j...@linkedin.com.invalid>
>> wrote:
>>
>> >
>> >
>> https://cwiki.apache.org/confluence/display/KAFKA/KIP-15+-+Add+a+close+method+with+a+timeout+in+the+producer
>> >
>> > As a short summary, the new interface will be as following:
>> > Close(Long Timeout, TimeUnit timeUnit)
>> >
>> >   1.  When timeout > 0, it will try to wait up to timeout for the sender
>> > thread to complete all the requests, then join the sender thread. If the
>> > sender thread is not able to finish work before timeout, the method
>> force
>> > close the producer by fail all the incomplete requests and join the
>> sender
>> > thread.
>> >   2.  When timeout = 0, it will be a non-blocking call, just initiate
>> the
>> > force close and DOES NOT join the sender thread.
>> >
>> > If close(timeout) is called from callback, an error message will be
>> logged
>> > and the producer sender thread will block forever.
>> >
>> >
>>
>>
>> --
>> -- Guozhang
>>
>
>

Reply via email to