Hi Currently i am studying logback logging framework. I came across Async Appenders which use blocking queue for logging messages in such a way that all the thread enqueue there messages in blocking queues and working thread of async appender is responsible for logging the message from queue to certain destination as decided by appenders it could be file,database,socket etc.
I can see the performance gain in response time as main thread won't perform the I/O it only pushes the messages in queue and in background worker thread for async appender retrieve those message and append them in logs file.
Is my understanding right? i read several configuration attribute related to async appender like Queue size , maxFlushTime,neverBlock,discardingThreshold and includeCallerData.
How i should use these attribute in order to boost performance in logging My current configuration for async Appender is as under.
<appender name="ASYNC500" class="ch.qos.logback.classic.AsyncAppender">
<appender-ref ref="fileAppender"/>
<queueSize>500</queueSize>
<maxFlushTime>1000</maxFlushTime>
</appender>
Can someone suggest me some tweaks in order to gain performance. ? Which is better normal appender or Async Appender ?