You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Ashwin Karpe <ak...@fusesource.com> on 2011/04/12 14:06:59 UTC

Re: Multiple message producers and consumers per ActiveMQ session

Hi,

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. 

Cheers,

Ashwin...

-----
---------------------------------------------------------
Ashwin Karpe
Apache Camel Committer & Sr Principal Consultant
FUSESource (a Progress Software Corporation subsidiary)
http://fusesource.com 

Blog: http://opensourceknowledge.blogspot.com 
CamelOne 2011: http://fusesource.com/camel2011 
---------------------------------------------------------
--
View this message in context: http://camel.465427.n5.nabble.com/Multiple-message-producers-and-consumers-per-ActiveMQ-session-tp4297889p4298040.html
Sent from the Camel - Users mailing list archive at Nabble.com.