camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen" ...@silverbullet.dk>
Subject RE: Camel 1.3 - how to overwrite redeliveryPolicy via Spring XML
Date Thu, 06 Nov 2008 10:13:27 GMT
Hi

Yeah 1.4 should fix most of it.
Reaming was that maximumRedeliveries was "off by one", that is fixed in 1.5.

Glad you posted to help out other users of Camel. Thanks.


Med venlig hilsen
 
Claus Ibsen
......................................
Silverbullet
Skovsgårdsvænget 21
8362 Hørning
Tlf. +45 2962 7576
Web: www.silverbullet.dk

-----Original Message-----
From: hanson2010 [mailto:hanson2010@gmail.com] 
Sent: 6. november 2008 11:08
To: camel-user@activemq.apache.org
Subject: RE: Camel 1.3 - how to overwrite redeliveryPolicy via Spring XML


I was running Camel inside ActiveMQ 5.1. So it's Camel 1.3.

Later I changed to ActiveMQ 5.3 SNAPSHOT, which bundles Camel 1.5.
Everything is fine now. But Will it be okay with Camel 1.4? BTW, I changed
some properties for RedeliveryPolicy.

  <bean id="redeliveryPolicyConfig"
class="org.apache.camel.processor.RedeliveryPolicy">
    <property name="maximumRedeliveries" value="-1" />
    <property name="delay" value="1000" />
    <property name="maximumRedeliveryDelay" value="30000" />
    <property name="backOffMultiplier" value="2" />
    <property name="useExponentialBackOff" value="true"/>
  </bean>

Thanks for your reply.



Claus Ibsen wrote:
> 
> Hi Hanson
> 
> What version of Camel are you using? 
> 
> Med venlig hilsen
>  
> Claus Ibsen
> ......................................
> Silverbullet
> Skovsgårdsvænget 21
> 8362 Hørning
> Tlf. +45 2962 7576
> Web: www.silverbullet.dk
> -----Original Message-----
> From: hanson2010 [mailto:hanson2010@gmail.com] 
> Sent: 6. november 2008 06:53
> To: camel-user@activemq.apache.org
> Subject: Re: Camel 1.3 - how to overwrite redeliveryPolicy via Spring XML
> 
> 
> Mine is as below. It does not work either.
> 
>   <camelContext id="camel"
> xmlns="http://activemq.apache.org/camel/schema/spring">
>     <route errorHandlerRef="deadLetterErrorHandler">
>       <from uri="activemq:DEST"/>
>       <to uri="remoteamq:DEST"/>
>     </route>
>   </camelContext>
> 
>   <bean id="deadLetterErrorHandler"
> class="org.apache.camel.builder.DeadLetterChannelBuilder">
>     <property name="redeliveryPolicy">
>       <ref bean="redeliveryPolicyConfig"/>
>     </property>
>     <property name="defaultDeadLetterEndpointUri" value="activemq:DL"/> 
>   </bean>
> 
>   <bean id="redeliveryPolicyConfig"
> class="org.apache.camel.processor.RedeliveryPolicy">
>     <property name="maximumRedeliveries" value="100" />
>     <property name="initialRedeliveryDelay" value="5000" />
>     <property name="useExponentialBackOff" value="true"/>
>     <property name="backOffMultiplier" value="2" />
>   </bean>
> 
> 
> 
> 0xygen08 wrote:
>> 
>> Hi,
>> I am using Camel 1.3, and try to overwrite the default redeliveryPolicy
>> on
>> one of the route.
>> I tried with the following spring configuration, and I didn't have
>> problem
>> starting 
>> application, but the maximumRedeliveries was still using default value 5.
>> 
>> Is it possible to do that in Camel 1.3 (I can't upgrade to 1.4/1.5 just
>> yet)? 
>> Thanks,
>> -O
>> 
>> <camelContext id="mycontext" autowireRouteBuilders="false"
>>             xmlns="http://activemq.apache.org/camel/schema/spring">
>>            
>>         <route>
>>             <from uri="my:src"/>
>> 	    <onException>
>> 	        <exception>
>> 	             java.lang.Exception
>> 		</exception>
>> 	        <redeliveryPolicy>
>> 	            <maximumRedeliveries>2</maximumRedeliveries>
>> 	        </redeliveryPolicy>
>> 	    </onException>             
>>          
>>             <to uri="md:x.queue"/>
>>             <to uri="bean:xxr"/>
>>             	          
>>         </route> 
>>     </camelContext>
>> 
> 
> -- 
> View this message in context:
> http://www.nabble.com/Camel-1.3---how-to-overwrite-redeliveryPolicy-via-Spring-XML-tp20274414s22882p20355558.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Camel-1.3---how-to-overwrite-redeliveryPolicy-via-Spring-XML-tp20274414s22882p20358281.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Mime
View raw message