activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rob Davies <rajdav...@gmail.com>
Subject Re: activeMQ thread pool
Date Thu, 01 Jul 2010 05:50:50 GMT
Not an easy answer - 
> 
> Hi,
> 
> By default activeMQ uses a thread per destination,
> is this destination topic/queue or  includes the clients also
> 
> ie, if we have three publishers sending messages to a topic and eight
> subscribers listening to it.
> How many threads are there in the broker for that topic. ( 1 or (3+8+1) )

> 
> 
> 
> -- 
> View this message in context: http://old.nabble.com/activeMQ-thread-pool-tp29041258p29041258.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
> 


Every transport connection in the broker (one per client connection) will use one thread -
unless you are using nio - then there is a configurable pool of threads to service all the
clients.
The transport connection thread is used to send messages to broker destination. For Queues
there is also a pool of threads used across all destinations to process messages in the queue
- ready for dispatching (unless you enable optimizeDispatch). For topics there is no corresponding
thread pool used for in destination processing. There is also an additional pool of threads
used across the broker to actually dispatch messages - unless you've configured asyncDispatch
to be off on the client (property on the ActiveMQConnectionFactory). Phew.
So answer your question - there are zero threads used per Topic.

cheers,

Rob

Rob Davies
follow me: http://twitter.com/rajdavies
I work here: http://fusesource.com
My Blog: http://rajdavies.blogspot.com/
I wrote this: http://www.manning.com/snyder/




Mime
View raw message