[ 
https://issues.apache.org/jira/browse/LOG4J2-3248?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17463215#comment-17463215
 ] 

Volkan Yazici commented on LOG4J2-3248:
---------------------------------------

[~bhaveshhpatel], mind submitting a PR containing a JUnit test reproducing the 
issue, please? Don't forget to target {{release-2.x}} branch. If PR also 
contains the fix, that would be great! ([~wuqian], have you seen this issue?)

> 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
>          Components: Appenders
>    Affects Versions: 2.16.0
>            Reporter: Bhavesh Patel
>            Priority: Major
>
> 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)

Reply via email to