activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From itelleria <>
Subject ActimeMQ Client's thread management
Date Wed, 13 Jan 2016 08:30:49 GMT

I'm analysing how ActiveMQ client manages the threads to send and receive
JMS messages and I have some questions that I would like to ask.

As far as I've understood when I call connectionFactory.createConnection(),
I get a Connection object which launches a Transport thread in the
background as well as other threads to monitor inactivity. Monitoring with
JConsole I can see these ActiveMQ threads running in the client:


Setting the useInactivityMonitor property to false, I can disable the
inactivity threads. However, apparently I can’t disable Transport thread.
Therefore, every time a Connection object is created a Transport thread is

I've seen that Transport threads reads different types of commands from the
socket connected to the broker (keepalive, wirecommand, messagedispatch,
etc) and when a MessageDispatch command is received, it executes the
corresponding MessageListener. So, for asynchronous message delivery I can
understand why the transport thread is created.

However, I think there are some cases when this thread is not needed. For
example, when I send a message I haven't seen that the Transport thread is
used. So, if I open connection only to send a Message, why the Transport
thread is created? I guess that the thread, which has invoked the send()
method, sends the message to the broker without using the transport thread. 

Thanks in advance,


View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message