kafka-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David KOCH <dk...@ezakus.com>
Subject 0.8.2 Producer sends blocking when brokers are unavailable
Date Fri, 31 Jul 2015 08:15:09 GMT
Hello,

The new producer org.apache.kafka.clients.producer.KafkaProducer seems to
block on send calls when the cluster is unavailable.

How do I disable this and make send calls fast fail in the event of
unavailable brokers? I know the 0.8.1 Scala-based producer did not block in
that case.

Regards,

/David



The polling errors I get periodically for each unavailable broker:
<156>1 2015-07-31T07:12:22.026Z  - Audit [ezakus@18060 level="WARN"
logger="org.apache.kafka.common.network.Selector"] Error in I/O with
stag-xxxx-002/xx.xxx.xx.xxx
java.net.ConnectException: Connection refused
    at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
    at
sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739)
    at org.apache.kafka.common.network.Selector.poll(Selector.java:238)
    at org.apache.kafka.clients.NetworkClient.poll(NetworkClient.java:192)
    at
org.apache.kafka.clients.producer.internals.Sender.run(Sender.java:191)
    at
org.apache.kafka.clients.producer.internals.Sender.run(Sender.java:122)
    at java.lang.Thread.run(Thread.java:745)

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