activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michal Singer <Michal.Sin...@expand.com>
Subject How to monitor queue size of a thread pool
Date Tue, 09 Feb 2010 05:55:03 GMT

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.


Mime
View raw message