Results 1 to 3 of 3

Thread: Spring JMS and ActiveMQ redelivery question

  1. #1
    Join Date
    Aug 2011
    Posts
    2

    Default Spring JMS and ActiveMQ redelivery question

    Hello Everyone,
    We are currently using ActivemMQ 5.3.1 and Spring 2.5 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.DefaultMes sageListenerContainer">
    <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.ActiveMQConnectionFacto ry">
    <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.PooledConnectionFa ctory" 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 please let me know the issue with our configuration?

  2. #2
    Join Date
    Aug 2011
    Posts
    2

    Default

    Anyone Help Please

  3. #3

    Default

    Doesn't seem to have an answer for this. You can still see this thread talking about it: http://forum.springsource.org/showth...light=activemq

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •