[ https://issues.apache.org/jira/browse/KAFKA-7134?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16558325#comment-16558325 ]
Attila Sasvari commented on KAFKA-7134: --------------------------------------- [~venkatpotru] please note if the underlying producer cannot connect to a Kafka broker (because the broker is not running), {{send()}} will fail and throw a {{TimeoutException}}. The producer will notice it and tries to log it: https://github.com/apache/kafka/blob/1d9a427225c64e7629a4eb2e2d129d5551185049/clients/src/main/java/org/apache/kafka/clients/producer/KafkaProducer.java#L876 However, if the {{rootLogger}} in {{log4j.properties}} is set to the {{KafkaLog4jAppender}}, it will try to log this message and send it to Kafka, and it creates an infinite loop. > KafkaLog4jAppender - Appender exceptions are propagated to caller > ----------------------------------------------------------------- > > Key: KAFKA-7134 > URL: https://issues.apache.org/jira/browse/KAFKA-7134 > Project: Kafka > Issue Type: Bug > Components: clients > Reporter: venkata praveen > Assignee: Andras Katona > Priority: Major > > KafkaLog4jAppender exceptions are propagated to caller when Kafka is > down/slow/other, it may cause the application crash. Ideally appender should > print and ignore the exception > or should provide option to ignore/throw the exceptions like > 'ignoreExceptions' property of > https://logging.apache.org/log4j/2.x/manual/appenders.html#KafkaAppender -- This message was sent by Atlassian JIRA (v7.6.3#76005)