camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ashwin Karpe <>
Subject Re: Multiple message producers and consumers per ActiveMQ session
Date Tue, 12 Apr 2011 12:06:59 GMT

The short answer is yes. It is thread safe. As for performant, it is more
nuanced. If you have multitple threads reusing the same session/connection,
you could get contention for the connection object. For performance, you may
be better off using a PooledConnectionFactory. I would also advise that you
set the consumer.prefetchSize on the Connection object to 1 in order to not
lock up a lot of memory in the connection objects.

This is very do-able in Camel by setting up the right kind of
ConnectionFactory for the JMS or ActiveMQ component.
Hope this helps. 



Ashwin Karpe
Apache Camel Committer & Sr Principal Consultant
FUSESource (a Progress Software Corporation subsidiary) 

CamelOne 2011: 
View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message