kafka-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jun Rao <jun...@gmail.com>
Subject Re: Error handling in async Producer
Date Wed, 12 Mar 2014 16:20:04 GMT
If all brokers are down, the async send will fail. In trunk, we have a new
producer written in java, which allows the caller to register a callback
during async send.

Thanks,

Jun


On Wed, Mar 12, 2014 at 6:52 AM, Yury Ruchin <yuri.ruchin@gmail.com> wrote:

> Hi,
>
> Having Kafka 0.8, I send messages using Producer in async mode. I wonder
> what will happen if a message cannot be sent (e. g. all brokers get down).
>
> In sync mode, error handling is straightforward: after
> "message.send.max.retries" the send() method will throw
> FailedToSendMessageException. However, in async mode send() does not
> actually check whether message has been successfully sent. It just enqueues
> messages to be processed by ProducerSendThread in background. As I
> currently understand, possible errors will not be exposed to the sender
> then. Am I missing something? Is there any way to set error handler for
> async Producer?
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message