You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "Bhavesh Patel (Jira)" <ji...@apache.org> on 2021/12/16 22:11:00 UTC

[jira] [Created] (LOG4J2-3248) Error while appending a message after Stopping/Restarting KafkaAppender

Bhavesh Patel created LOG4J2-3248:
-------------------------------------

             Summary: Error while appending a message after Stopping/Restarting KafkaAppender
                 Key: LOG4J2-3248
                 URL: https://issues.apache.org/jira/browse/LOG4J2-3248
             Project: Log4j 2
          Issue Type: Bug
            Reporter: Bhavesh Patel


As a part of this commit, [https://github.com/apache/logging-log4j2/commit/97db5743a3b10e9017bf70794d6275b21553dd44], the thread leak issue was fixed. But it seems to have introduced a bug?
 
What if the KafkaAppender is stopped? In the calls hierarchy, the KafkaManager.stop() is called. This in turn calls KakfaManager.releaseSub() which calls KafakManager.closeProducer(). The closeProducer() closes the producer. Now when you try to restart the KafkaAppender and append a message using KafkaAppender.append() the following message is seen
 
"Cannot perform operation after producer has been closed".
 
This used to work before the above mentioned fix.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)