[ https://issues.apache.org/jira/browse/JAMES-3803?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17578506#comment-17578506 ]
Adrian Bucher commented on JAMES-3803: -------------------------------------- It is not an ActiveMQ issue, i also think the other implementation should be affected to. The not waiting thread is "RemoteDelivery-10" (this is the one i refer als dequeuing thread), in this thread the "lost mails" are waiting to be processed. the nature of the boundedElasticScheduler is that if it runs out of threads it starts to queue the tasks, but there is no global queue for the tasks, each thread has it's own queue, and the new tasks will always be assigned to the thread with the smalles queue. As the dequeuing task runs in the same pool ("RemoteDelivery-10") as the processing, this thread also gets assigned new Tasks, but as the dequeueing task never ends, they will never be processed. Another debug point that helped me to understand the issue was the pick() function in the reactor.core.scheduler.BoundedElasticScheduler$BoundedServices.pick() (i.e. line 533) > DeliveryRunnable blocks email in BoundedElasticScheduler-queue if running out > of threads > ---------------------------------------------------------------------------------------- > > Key: JAMES-3803 > URL: https://issues.apache.org/jira/browse/JAMES-3803 > Project: James Server > Issue Type: Bug > Components: Remote Delivery > Affects Versions: 3.7.0 > Reporter: Adrian Bucher > Priority: Major > Attachments: jstack-of-the-bug.txt > > Time Spent: 0.5h > Remaining Estimate: 0h > > The DeliveryRunnable does use the same BoundedElasticScheduler (ThreadPool) > for dequeuing the messages (long running thread), and processing (delivering) > them, if lots of messages are dequeued and the BoundedElasticScheduler starts > to queue them, the one queueing behind the dequeuing - long running thread > are never processed nor delivered. > > Messages are still visible in the embedded activemq delivery queues, a > restart of the james will process them, as they will be reacknoledged by the > dequeuer. > > -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org For additional commands, e-mail: server-dev-h...@james.apache.org