XML configuration for error handling

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

XML configuration for error handling

pratibhaG
Is it possible to have XML configuration for errorHandler? If it is, how can I convert following in XML?
RouteBuilder builder = new RouteBuilder() {
    public void configure() {
        errorHandler(deadLetterChannel("seda:errors").maximumRedeliveries(2).useExponentialBackOff());
        from("seda:a").to("seda:b");
    }
};

I am trying something like this:

<camelContext id="errorhandler" xmlns="http://activemq.apache.org/camel/schema/spring">
  <route>
    <from uri="seda:a"/>
          <try>
             <to uri="seda:b"/>
           <catch>
        <exception>Exception</exception>
        <to uri="jbi:endpoint:http://myerrorhandler/beanEndpoint"/>
      </catch>
    </try> 
  </route>
</camelContext>

But I dont know how to implement "maximumRedeliveries(2)"
Pratibha
Reply | Threaded
Open this post in threaded view
|

Re: XML configuration for error handling

jstrachan
We don't currently support this - but its a pending issue...
http://issues.apache.org/activemq/browse/CAMEL-122

2008/6/19 pratibhaG <[hidden email]>:

>
> Is it possible to have XML configuration for errorHandler? If it is, how can
> I convert following in XML?
> RouteBuilder builder = new RouteBuilder() {
>    public void configure() {
>
> errorHandler(deadLetterChannel("seda:errors").maximumRedeliveries(2).useExponentialBackOff());
>        from("seda:a").to("seda:b");
>    }
> };
>
> I am trying something like this:
>
> <camelContext id="errorhandler"
> xmlns="http://activemq.apache.org/camel/schema/spring">
>  <route>
>    <from uri="seda:a"/>
>          <try>
>             <to uri="seda:b"/>
>           <catch>
>        <exception>Exception</exception>
>                <to uri="jbi:endpoint:http://myerrorhandler/beanEndpoint"/>
>      </catch>
>    </try>
>  </route>
> </camelContext>
>
> But I dont know how to implement "maximumRedeliveries(2)"
> Pratibha
> --
> View this message in context: http://www.nabble.com/XML-configuration-for-error-handling-tp18006102s22882p18006102.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>



--
James
-------
http://macstrac.blogspot.com/

Open Source Integration
http://open.iona.com