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 08:29:23 GMT
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.


Mime
View raw message