kafka-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yury Ruchin <yuri.ruc...@gmail.com>
Subject Error handling in async Producer
Date Wed, 12 Mar 2014 13:52:28 GMT
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