You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by NISHANT BULCHANDANI <nb...@gmail.com> on 2016/03/08 13:43:05 UTC

Producer keeps trying to reconnect if kafka is down & fills up log file

Hi All,

We are using Kafka Producer in our web application. Things are fine when it
is up, but in case it goes down, the log is over populated with the
following error :

2016-03-07 12:37:42,813 WARN  [kafka-producer-network-thread | producer-1]
[Selector] [line : 276 ]  -  Error in I/O with /10.41.105.23
java.net.ConnectException: Connection refused
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) ~[na:1.8.0_74]
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)
~[na:1.8.0_74]

Is there a configuration that can direct the producer to not Retry
Connecting again and again? i.e, throw an exception only when we are trying
to send a message?