activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From neoman <harira...@gmail.com>
Subject Activemeq Redelivery Question
Date Tue, 23 Aug 2011 03:30:24 GMT
Hello Everyone, 
We are currently using ActivemMQ 5.3.1 in our project. This is our
redelivery policy. 

        <bean id="redeliveryPolicy"
class="org.apache.activemq.RedeliveryPolicy">
                <property name="initialRedeliveryDelay" value="15000" />
                <property name="maximumRedeliveries" value="3" />
                <property name="useExponentialBackOff" value="true" />
                <property name="backOffMultiplier" value="2" />
        </bean>

We are using Spring DefaultMessageListenerContainer for the message
listener. 

    <bean id="queueListenerContainer"
class="org.springframework.jms.listener.DefaultMessageListenerContainer">
        <property name="concurrentConsumers" value="3" />
        <property name="maxConcurrentConsumers" value="5" />
        <property name="destination" ref="queue" />
        <property name="messageListener" ref="queueListener" />
        <property name="connectionFactory" ref="jmsConnectionFactory" />
        <property name="cacheLevelName" value="CACHE_CONNECTION"/>
        <property name="receiveTimeout" value="10000"/>  
        <property name="sessionTransacted" value="true" />  
    </bean>

Connection Factory 

    <bean id="connectionFactory"
class="org.apache.activemq.ActiveMQConnectionFactory">
                <property name="brokerURL" value="tcp://localhost:61616"/>
                <property name="sendTimeout" value="1000"/>
                                <property name="redeliveryPolicy"
ref="redeliveryPolicy"/>
                                <property name="prefetchPolicy">
                                        <bean
class="org.apache.activemq.ActiveMQPrefetchPolicy">
       	 <property name="queuePrefetch" value="1" />
       	 <property name="topicPrefetch" value="1" />        
       	 </bean>
        </property>
   </bean>
    
    <bean id="jmsConnectionFactory"
class="org.apache.activemq.pool.PooledConnectionFactory"
destroy-method="stop" init-method="start">
        <property name="maxConnections" value="10" />
        <property name="maximumActive" value="100" />
        <property name="connectionFactory" ref="connectionFactory"/>
            
    </bean>

While testing, i found that if i post one poison message (meant to go to
DLQ) and one good message, the good message is getting processed only after
retrying the poison message three times. 
Its not getting processed immediately. Is it because of the Prefetch? 

Can any one suggest the issue with our configuration? 

--
View this message in context: http://activemq.2283324.n4.nabble.com/Activemeq-Redelivery-Question-tp3761805p3761805.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Mime
View raw message