activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rob Davies <>
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:
> Sent from the ActiveMQ - User mailing list archive at

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
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.



Rob Davies
follow me:
I work here:
My Blog:
I wrote this:

View raw message