activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dejan Bosanac <de...@nighttale.net>
Subject Re: Activemeq Redelivery Question
Date Tue, 23 Aug 2011 09:36:39 GMT
There's no issue with the configuration, it's just how it works. The
consumer will try to consume the message "maximumRedeliveries" of times
before sending it to dlq and move to other messages.

Regards
-- 
Dejan Bosanac - http://twitter.com/dejanb
-----------------
The experts in open source integration and messaging - http://fusesource.com
ActiveMQ in Action - http://www.manning.com/snyder/
Blog - http://www.nighttale.net


On Tue, Aug 23, 2011 at 5:30 AM, neoman <hariram.s@gmail.com> wrote:

> 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
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message