camel spring pool config, match concurrentConsumers to pool maxActive*num routes

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1162743 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Gary Tully 2011-08-29 11:21:44 +00:00
parent 17995e6fac
commit 33eb944e18
1 changed files with 6 additions and 4 deletions

View File

@ -32,8 +32,10 @@
</bean> </bean>
<bean id="vhfBatchListenerPooledConnectionFactory" class="org.apache.activemq.pool.PooledConnectionFactory"> <bean id="vhfBatchListenerPooledConnectionFactory" class="org.apache.activemq.pool.PooledConnectionFactory">
<property name="maxConnections" value="1"/> <!-- match maxConnections to the number of routes that share the connection factory -->
<property name="maximumActive" value="1"/> <property name="maxConnections" value="2"/>
<!-- match maximumActive (which is active sessions) to num routes * concurrentConsumers in the MLC -->
<property name="maximumActive" value="20"/>
<property name="connectionFactory" ref="vhfBatchListenerJMSConnectionFactory"/> <property name="connectionFactory" ref="vhfBatchListenerJMSConnectionFactory"/>
</bean> </bean>
@ -51,6 +53,7 @@
<bean id="vhfBatchListenerJMSConfig" class="org.apache.camel.component.jms.JmsConfiguration"> <bean id="vhfBatchListenerJMSConfig" class="org.apache.camel.component.jms.JmsConfiguration">
<property name="connectionFactory" ref="vhfBatchListenerPooledConnectionFactory"/> <property name="connectionFactory" ref="vhfBatchListenerPooledConnectionFactory"/>
<property name="transactionManager" ref="vhfBatchListenerJMSTransactionManager"/> <property name="transactionManager" ref="vhfBatchListenerJMSTransactionManager"/>
<property name="receiveTimeout" value="20000" />
<property name="transacted" value="true"/> <property name="transacted" value="true"/>
<property name="concurrentConsumers" value="10"/> <property name="concurrentConsumers" value="10"/>
<property name="cacheLevelName" value="CACHE_CONSUMER"/> <property name="cacheLevelName" value="CACHE_CONSUMER"/>
@ -73,11 +76,10 @@
<camelContext xmlns="http://camel.apache.org/schema/spring"> <camelContext xmlns="http://camel.apache.org/schema/spring">
<route> <route>
<from uri="activemq:queue:scp_transacted"/> <from uri="activemq:queue:scp_transacted"/>
<!-- transacted /-->
<process ref="connectionLog"/> <process ref="connectionLog"/>
</route> </route>
<!-- marginally better through put with a second route/connection --> <!-- better through put with a second route/connection once shared pool config matches concurrentConsumers -->
<route> <route>
<from uri="activemq2:queue:scp_transacted"/> <from uri="activemq2:queue:scp_transacted"/>
<process ref="connectionLog"/> <process ref="connectionLog"/>