Have you tried to set blocking="false" on the AsyncAppender you have around KafkaAppender?
Have you tried using the system properties log4j2.AsyncQueueFullPolicy and log4j2.DiscardThreshold? https://logging.apache.org/log4j/2.x/manual/configuration.html#log4j2.AsyncQueueFullPolicy On Tue, Mar 14, 2017 at 1:00 PM, Yang Rui <yang_ru...@outlook.com> wrote: > Hi, > > I am Rui from China. > > We use both of KafkaAppender (with a AsyncAppender wrapper) > and FileAppender of log4j2 with version 2.6.2 in the application. > > Here is the scenaria, when kafka cluster down and stop > service, the application will slow down and wait for given timeout ( > request.timeout.ms) > > to response finally (The bufferSize of AsyncKafka is reached). > > I am wondering if there is any solution that the > fileAppender can always work normally without any performance issue which > affected > > by KafkaAppender. In other words, the KafkaAppender can " > DISCARD" the logs when kafka cluster down while the application > > can output the logs by FileAppender. > > > Thanks, > Rui > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org > For additional commands, e-mail: log4j-user-h...@logging.apache.org > -- [image: MagineTV] *Mikael Ståldal* Senior software developer *Magine TV* mikael.stal...@magine.com Grev Turegatan 3 | 114 46 Stockholm, Sweden | www.magine.com Privileged and/or Confidential Information may be contained in this message. If you are not the addressee indicated in this message (or responsible for delivery of the message to such a person), you may not copy or deliver this message to anyone. In such case, you should destroy this message and kindly notify the sender by reply email.