My SensitiveEncoder masks some data published to file and sends messages to kafka at the stage of encoding (that's for audit purposes).
When kafka fails it logs the error. As everything goes to ASYNC_FILE appender , the message goes to ArrayBlockingQueue in AsyncAppender.
If the log pressure is quite big, then queue is full and no new message can be added to it. Here we come to deadlock.
Inspecting the code i found that AsyncAppender doesn't consider thread calling 'append' method. I do not expect errors happened on Worker thread to be delayed and added to the queue again.
My suggestion is next:
in private void put(E eventObject) add check:
if (Thread.currentThread() == worker) then aai.appendLoopOnAppenders(e);
Hi, i have the next configuration:
My SensitiveEncoder masks some data published to file and sends messages to kafka at the stage of encoding (that's for audit purposes). When kafka fails it logs the error. As everything goes to ASYNC_FILE appender , the message goes to ArrayBlockingQueue in AsyncAppender.
If the log pressure is quite big, then queue is full and no new message can be added to it. Here we come to deadlock.
Inspecting the code i found that AsyncAppender doesn't consider thread calling 'append' method. I do not expect errors happened on Worker thread to be delayed and added to the queue again.
My suggestion is next: in
private void put(E eventObject)
add check: