Check out this page https://camel.apache.org/exception-clause.html
Specifically look for the section: *Handle and continue exceptions* *Robert Simmons Jr. MSc. - Lead Java Architect @ EA* *Author of: Hardcore Java (2003) and Maintainable Java (2012)* *LinkedIn: **http://www.linkedin.com/pub/robert-simmons/40/852/a39 <http://www.linkedin.com/pub/robert-simmons/40/852/a39>* On Fri, Apr 4, 2014 at 5:31 AM, a746076drdrb <[email protected]> wrote: > Hello, > > I have a route with onException clause. Additionally, I'd like to ignore > all > exception on some not so important parts of the route while saving > exception > policy on the rest of the route. If an exception occurs while enriching the > message with results of to("http://notimportant).to("ftp:notimportant"), > it > must be ignored and message should be routed to .to("http:important"). I > know, there is doTry(), but then I onException clause is lost. Is there a > way to do this? > > onException(HttpOperationFailedException.class) > .handled(true) > .maximumRedeliveries(3) > .redeliveryDelay(1000) > .asyncDelayedRedelivery(); > > > from("file:input") > .process(new MyProcessor()) > .to("http://notimportant) //ignore all exception, continue routing > .to("ftp:notimportant") //ignore all exception, continue routing > .to("http:important") // on HttpOperationFailedException try to redeliver > > > Thanks for help > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/How-to-ignore-all-error-on-some-parts-in-a-route-tp5749790.html > Sent from the Camel - Users mailing list archive at Nabble.com. >
