You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Michal Singer <Mi...@expand.com> on 2010/02/09 06:55:03 UTC

How to monitor queue size of a thread pool

hi. i am trying to check out during runtime, the queue of waiting tasks of a
thread pool. 
I am using org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor 
and calling this: 

ThreadPoolTaskExecutor.getThreadPoolExecutor().getQueue().size() 

But it returns the pool size (ThreadPoolTaskExecutor.getPoolSize()) and not
the queue size  (which should be different where pool size is the threads
which are available to run and queue size is the tasks waiting to be
executed in those threads. ) 

Anybody knows how to extarct this information? (the TaskCount minus
Completed task count) 

Thanks, Michal 

-- 
View this message in context: http://old.nabble.com/How-to-monitor-queue-size-of-a-thread-pool-tp27510776p27510776.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.