activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christopher G. Stach II" <...@ldsys.net>
Subject Re: Testing "maximumRedeliveries"... MDP does not receives messages once an Exception is thrown...
Date Fri, 02 Feb 2007 19:01:29 GMT
Nilantha wrote:
> I have posted this message earlier but it seems lost... sorry if I make
> duplicates. 
> 
> I am using Jencks(2.0) for inbound. I am throwing a Runtime exception in
> order to test max redelivery setting (I couldn't find any better way to test
> with MDPs). If there are no exceptions thrown from MDP messages are consumed
> continuously. But as soon as an exception is thrown MDP no longer receives
> messages. Only way to get those consumed is restart the app with consumers
> again and again. Each time I see rediliveryCount has been increased by 1 for
> any message remained the queue. 
> 
> This is how I have configured "maximumRedeliveries" 
> 
>   <bean id="activeMQResourceAdapter"
> class="org.apache.activemq.ra.ActiveMQResourceAdapter"> 
>     <property name="serverUrl" value="tcp://192.121.139.110:61416"/> 
>     <property name="initialRedeliveryDelay"><value>2000</value></property>

>         <property name="maximumRedeliveries"><value>3</value></property>

>         <property
> name="redeliveryBackOffMultiplier"><value>2</value></property> 
>         <property
> name="redeliveryUseExponentialBackOff"><value>true</value></property>

>         <property name="allPrefetchValues"><value>1</value></property>

>   </bean> 
> 

Try just configuring it on the URL for your RA.  This is what I use:

failover:(tcp://mq1.xxx:49995,tcp://mq2.xxx:49995)?jms.redeliveryPolicy.allPrefetchValues=1&jms.redeliveryPolicy.initialRedeliveryDelay=2000&jms.redeliveryPolicy.maximumRedeliveries=24&jms.redeliveryPolicy.useCollisionAvoidance=true

I used to configure it with the bean properties and it worked, but this
was better for my project setup.

-- 
Christopher G. Stach II


Mime
View raw message