camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen" <claus.ib...@gmail.com>
Subject Re: onException for a particular route
Date Sat, 03 Jan 2009 08:12:43 GMT
Hi

I haven't forgotten about this. It's marked with a star in my gmail.
But I have other starts as well to attend look into.

Yeah the DSL is a bit widespread so you can do it. It gets a bit more
complex when you can have
a) local route onException (defined in the start)
b) sub local onException (defined in the middle of the routing)
c) global onException

I guess it would be best to support a+c.

Martin we have recently fixed (2-3 weeks) ago a flaw in the error
handling logic that resolves which onException to handle a given
exception. So the code might already work.

I will check it up a bit later.


On Tue, Dec 2, 2008 at 5:36 PM, Martin Gilday <martin.lists@imap.cc> wrote:
> I've attempted what Claus suggested on putting onException in a route
>
> from("somewhere").onException(IllegalArgumentException.class).maximumRedeliveries(0).to("someplace")
>
> Camel allows this to start up but it appears to have no affect and
> routes simply time out.
>
> Can anyone comment on whether this is valid?
> http://activemq.apache.org/camel/exception-clause.html makes no mention
> of if this should be permitted on not.
>
> Thanks,
> Martin.
>
>
> ----- Original message -----
> From: "Martin Gilday" <martin.lists@imap.cc>
> To: camel-user@activemq.apache.org
> Date: Wed, 26 Nov 2008 14:59:34 +0000
> Subject: onException for a particular route
>
> Reading through the docs there is an explanation of how to use
> onException to set error handling for the global context.  There is also
> instructions on how to set up an errorHandler for a particular route.
> Is it possible to set up onException handlers that only apply to an
> individual or subset of routes?  deadLetterChannelBuilder has method
> named exceptionPolicyStrategy which may be what I am after.  Could
> someone point me in the direction of a code snippet of how to use this?
>
> Thanks,
> Martin.
>



-- 

/Claus Ibsen
Apache Camel Committer
Blog: http://davsclaus.blogspot.com/

Mime
View raw message