You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by Niek Sanders <ni...@gmail.com> on 2012/03/13 21:04:18 UTC

Async producer and close()

Will calling close() on the async producer block until the message
queue has emptied?

If not, how does one wait till all messages have been sent out?

Thanks,
Niek

Re: Async producer and close()

Posted by Joel Koshy <jj...@gmail.com>.
Yes - it blocks until all the send threads' message queues have been
drained.

Joel

On Tue, Mar 13, 2012 at 1:04 PM, Niek Sanders <ni...@gmail.com>wrote:

> Will calling close() on the async producer block until the message
> queue has emptied?
>
> If not, how does one wait till all messages have been sent out?
>
> Thanks,
> Niek
>