vy commented on issue #3395:
URL: 
https://github.com/apache/logging-log4j2/issues/3395#issuecomment-2594657136

   > `queue` has no upper limit
   
   @rschuetz, I think you have a misunderstanding on the way queueing recycler 
works. It uses `Queue#poll()`, which _can_ be a blocking operation. If JCTools 
is not in the classpath, or, if you explicitly specify the queue to be 
`j.u.c.ArrayBlockingQueue`, `poll()` requests exceeding the 
capacity<sup>1</sup> will block – precisely what you wanted, right? In 
conclusion, you can either use the default queueing recycler by explicitly 
opting for `j.u.c.ArrayBlockingQueue`:
   
   ```
   queue:supplier=java.util.concurrent.ArrayBlockingQueue.new
   ```
   
   or you can provide your own queue supplier where you block on `poll()` if 
the queue is empty.
   
   <sup>1</sup> Unless provided, the queue capacity defaults to `max(2 * 
Runtime.getRuntime().availableProcessors() + 1, 8)`.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@logging.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to