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.
Printable View
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.
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.
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.ActiveMQConnectionFacto ry">
<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.ActiveMQConnectionFacto ry">
<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>
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).
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.Code:<jms-gateway id="jmsGateway"
connection-factory="connectionFactory"
destination="inQueue"
request-channel="inAndOutChannel"/>