camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From slew77 <stephen.lewi...@yahoo.co.uk>
Subject ActiveMQ concurrentConsumers vs multiple connections
Date Thu, 18 Feb 2016 10:05:47 GMT

We are finding that under load that a single activemq endpoint with many
concurrent consumers can't keep up with the volume of traffic. However, if
we split the concurrent consumers between several identical routes it
performs much better.

E.g. if we configure this:

        <route>
            <from uri="activemq:queue:test?concurrentConsumers=100"/>
            <transacted/>
            <to uri="log:test?level=DEBUG"/>
        </route>

The test queue quickly backs up.

However, if we configure 10 identical routes:
        <route>
            <from uri="activemq:queue:test?concurrentConsumers=10"/>
            <transacted/>
            <to uri="log:test?level=DEBUG"/>
        </route>
        <route>
            <from uri="activemq:queue:test?concurrentConsumers=10"/>
            <transacted/>
            <to uri="log:test?level=DEBUG"/>
        </route>
        <route>
            <from uri="activemq:queue:test?concurrentConsumers=10"/>
            <transacted/>
            <to uri="log:test?level=DEBUG"/>
        </route>
etc

Then the same load is handled without backing up.

---

This is the activemq configuration:

    
    <bean id="activemq"
class="org.apache.activemq.camel.component.ActiveMQComponent">
        <property name="connectionFactory" ref="poolConnectionFactory"/>
        
        <property name="transacted" value="true"/>
        
        <property name="transactionManager" ref="jmsTransactionManager"/>
        <property name="cacheLevelName" value="CACHE_CONSUMER" />
    </bean>

    
    <bean id="jmsTransactionManager"
class="org.springframework.jms.connection.JmsTransactionManager">
        <property name="connectionFactory" ref="poolConnectionFactory"/>
    </bean>

    
    <bean id="poolConnectionFactory"
class="org.apache.activemq.pool.PooledConnectionFactory" init-method="start"
destroy-method="stop">
        <property name="maxConnections" value="8"/>
        <property name="connectionFactory" ref="jmsConnectionFactory"/>
        <property name="idleTimeout" value="0"/>
    </bean>

    <bean id="jmsConnectionFactory"
class="org.apache.activemq.ActiveMQConnectionFactory">
        <property name="brokerURL" value="tcp://localhost:61616"/>
    </bean>

    <bean id="required"
class="org.apache.camel.spring.spi.SpringTransactionPolicy">
        <property name="transactionManager" ref="jmsTransactionManager"/>
        <property name="propagationBehaviorName"
value="PROPAGATION_REQUIRED"/>
    </bean>


It's much less easy to configure the system when every queue connection must
be duplicated. Is there anything that can be tuned for the single route
option with more concurrentConsumers?

Thanks,
Steve.



--
View this message in context: http://camel.465427.n5.nabble.com/ActiveMQ-concurrentConsumers-vs-multiple-connections-tp5777831.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message