On 5/22/07, Jeff Gunther <[EMAIL PROTECTED]> wrote:
We did some load testing today and noticed some performance issues
with the JmsComponent. Based on some research, it appears that
Spring's SingleConnectionFactory might improve performance.

Sorry about that - we should have big flashing warning signs on the
site; basically Spring's JMS support assumes some kind of JMS pool
underneath. So when not using a J2EE container and JCA, its advisable
to use a pooled JMS connection for sending. Otherwise Spring's
JmsTemplate will create a Connection, Session, Producer for each
message send! Which is the most inefficient way possible of working
with JMS :)


Do you think that the SingleConnectionFactory can improve overall JMS
performance? If so, how can the JmsComponent be configured to use a
SingleConnectionFactory?

If you are using ActiveMQ then the PooledConnectionFactory is even
better (as it pools sessions & producers as well as using a shared
connection).

To avoid folks having to worry about this; I've hacked up an ActiveMQ
component for Camel.
http://cwiki.apache.org/CAMEL/activemq.html

where it just defaults to connecting to ActiveMQ on the default port
on localhost; otherwise you can customize the brokerURL property and
it does the right thing (using a PooledConnectionFactory for sending
and the spring based ActiveMQConnectionFactory for consuming).

--
James
-------
http://macstrac.blogspot.com/

Reply via email to