camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ashwin Karpe <aka...@fusesource.com>
Subject Re: Multiple message producers and consumers per ActiveMQ session
Date Tue, 12 Apr 2011 12:06:59 GMT
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.

Mime
View raw message