activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <james.strac...@gmail.com>
Subject Re: [camel] Spring's SingleConnectionFactory
Date Tue, 22 May 2007 12:03:32 GMT
On 5/22/07, Jeff Gunther <jeff.gunther@intalgent.com> 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/

Mime
View raw message