View Full Version : Performance of Spring integration is low
sureshsugunan
May 28th, 2008, 03:19 AM
Hi,
I am trying to send some large data using jms adapters of spring integration.
i am achecing 45 messages (lines in the file) per second. but this is releatively very low when comparing to Mule and other ESBs. what could be the probelm.
iwein
May 28th, 2008, 08:49 AM
Can you show the configuration? It could be that you can increase the concurrency and get an improvement that way, but without the config we can just guess.
sureshsugunan
May 29th, 2008, 04:15 AM
this is the configuration i am using
<channel id="inChannel" />
<jms-target channel="inChannel"
connection-factory="connectionFactory" destination="inQueue" />
<beans:bean id="connectionFactory"
class="org.apache.activemq.ActiveMQConnectionFactory">
<beans:property name="brokerURL" value="tcp://localhost:51616" />
</beans:bean>
<beans:bean id="inQueue"
class="org.apache.activemq.command.ActiveMQQueue">
<beans:constructor-arg index="0" value="sample.queue" />
</beans:bean>
<channel id="inAndOutChannel" />
<jms-source channel="inAndOutChannel"
connection-factory="connectionFactory" destination="inQueue" />
<beans:bean id="connectionFactory"
class="org.apache.activemq.ActiveMQConnectionFactory">
<beans:property name="brokerURL" value="tcp://localhost:51616" />
</beans:bean>
<beans:bean id="inQueue"
class="org.apache.activemq.command.ActiveMQQueue">
<beans:constructor-arg index="0" value="sample.queue" />
</beans:bean>
Mark Fisher
May 29th, 2008, 06:46 AM
One thing you might want to try is to use the <jms-gateway/> instead of the <jms-source/>. The "source" polls a JMS destination (invoking jmsTemplate.receive() each time) and thus is definitely not the best choice for performance. The "jms-source" really only makes sense for cases where you expect low message volume and want to poll rather infrequently. On the other hand, "jms-gateway" is message-driven (using Spring's MessageListener container).
<jms-gateway id="jmsGateway"
connection-factory="connectionFactory"
destination="inQueue"
request-channel="inAndOutChannel"/>
Also note that we will be exposing more of the configuration parameters for the jms-gateway in the M5 release, so that it can be fine-tuned for performance.
Powered by vBulletin® Version 4.2.1 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.