ActiveMQ broker doesn't honor exponential backoff while retrying

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

ActiveMQ broker doesn't honor exponential backoff while retrying

archerabi
Hello, I'm using ActiveMQ Broker v 5.14.3. Whenever messages need to be redelivered to my clients, activemq only honors the maximumRedeliveries field. It then redelivers at random intervals.

Here's my client configuration.
<!-- Config  -->
<bean id="prefetchPolicy" class="org.apache.activemq.ActiveMQPrefetchPolicy">
    <property name="queuePrefetch" value="1"></property>
</bean>
<bean id="redeliveryPolicy" class="org.apache.activemq.RedeliveryPolicy">
    <property name="maximumRedeliveries" value="${jms.lead.max.retry.attempts}"/>
    <property name="initialRedeliveryDelay" value="15000"/>
    <!-- 15 seconds -->
    <property name="maximumRedeliveryDelay" value="1800000" />
    <!-- 30 minutes -->
    <property name="useExponentialBackOff" value="true" />
    <property name="backOffMultiplier" value="4" />
    <property name="queue" value="*" />
</bean>
<bean id="retryJmsFactory" class="org.apache.activemq.ActiveMQConnectionFactory">
    <property name="nonBlockingRedelivery" value="true" />
    <property name="brokerURL" value="${jms.broker.url}" />
    <property name="redeliveryPolicy" ref="redeliveryPolicy"/>
    <property name="prefetchPolicy" ref="prefetchPolicy"/>
</bean>
<bean id="pooledRetryConnectionFactory" class="org.apache.activemq.jms.pool.PooledConnectionFactory">
    <property name="connectionFactory" ref="retryJmsFactory" />
    <property name="maxConnections" value="10" />
</bean>
<!-- Consumer -->
<bean id="leadRetryListener" class="com.company.app.consumer.Consumer1" />
<bean id="leadRetryJmsContainer" class="org.springframework.jms.listener.DefaultMessageListenerContainer">
    <property name="connectionFactory" ref="pooledRetryConnectionFactory" />
    <property name="destination" ref="destination1" />
    <property name="messageListener" ref="listener1" />
    <property name="sessionTransacted" value="true" />
    <property name="cacheLevelName" value="CACHE_CONSUMER"/>
</bean>
Loading...