You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Dhruba Bandopadhyay <bd...@gmail.com> on 2008/04/10 11:09:35 UTC

Broker to Consumer ratio

Hi,

Recently I've had a lot of problems with my app.  The most noteable
with v4.1.1 are below.

-- Messages being left on queue when consumers are there.
-- Obtaining lock exceptions with derby.

I am wondering is six consumers to a broker too much for the broker or
for derby?  How do I arrive at a figure for what is enough?  Is it
perhaps worth trying to distribute the load between multiple brokers?
What way of doing so would you recommend?

My consumer config is as below.

    <bean id="connectionFactory"
class="org.jencks.amqpool.PooledConnectionFactory"
destroy-method="stop">
        <constructor-arg value="BROKER{broker.url.failover}BROKER" />
        <property name="maxConnections" value="10" />
        <property name="maximumActive" value="1000" />
    </bean>

    <bean id="jmsTemplate" class="org.springframework.jms.core.JmsTemplate">
        <property name="connectionFactory" ref="connectionFactory" />
        <property name="messageConverter" ref="messageConverter" />
        <property name="receiveTimeout" value="10000" />
    </bean>

    <bean id="threadPoolTaskExecutor"
class="org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor">
        <property name="corePoolSize" value="5" />
        <property name="maxPoolSize" value="5" />
        <property name="threadNamePrefix" value="consumer-thread-" />
    </bean>

    <jms:listener-container concurrency="5-5"
message-converter="shoal.shared.MessageConverter"
task-executor="threadPoolTaskExecutor">
        <jms:listener destination="BROKER{broker.queue.deploy}BROKER"
ref="consumer" method="consume" />
    </jms:listener-container>

Are my maxConnections and maximumActive too high perhaps?  Is the rest
of my consumer spring configuration okay?

Any help would be much appreciated as I really don't want to switch
provider at this point.

Thanks.