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: Using recipientList with onException
Date Fri, 24 Apr 2015 12:02:42 GMT
Hi

You likely need to 2 x end to end the recipient list and also the
onException since its route scoped.

On Fri, Apr 24, 2015 at 1:56 PM, Ilya Karpov <i.karpov@cleverdata.ru> wrote:
> Hi guys, am I right that it's not possible to use recipientList with
> onException?
> I got exception:
> From[direct:toRawDataResolver] <<< in route:
> Route(route5)[[From[direct:toRawDataResolver]] -> [OnExcepti... because of
> Route route5 has no output processors. You need to add outputs to the route
> such as to("log:foo").
> The code I used is:
>
> from("direct:toRawDataResolver")
>     .onException(Exception.class)
>
> .recipientList(simple("metrics:meter:datapoint.resolve.failure.rate.${body.dspId}"))
>     .end()
>     .bean(processingFacade, "handleMessage")
>
> .recipientList(simple("metrics:meter:datapoint.resolve.success.rate.${body.dspId}"));
>
>
> Is it any workaround, our may be I'm doing smth wrong?
> Actually I can cope with problem using try-catch statement, but can I do
> that same using onException?
> --
> *Ilya Karpov*
> Developer
>
> CleverDATA
> make your data clever



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/

Mime
View raw message