You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Henrik Brautaset Aronsen <he...@synth.no> on 2015/10/12 10:06:58 UTC
Missing handle(boolean) in Camel 2.16.0
This worked in 2.15.x:
RoutesDefinition routeDef = someRouteDef();
routeDef.onException(someException)
.wireTap(someUri)
.newExchange(someProcessor)
.end()
.handle(true)
.bean(someBean);
But in 2.16.0 it seems like .handle(..) isn't available anymore. Any
suggestions on how to mark this as handled now?
Cheers,
Henrik
Re: Missing handle(boolean) in Camel 2.16.0
Posted by Henrik Brautaset Aronsen <he...@synth.no>.
On Mon, Oct 12, 2015 at 12:35 PM, Joakim Bjørnstad <jo...@gmail.com>
wrote:
>
> Well right now it doesn't seem possible in that order, which is
> unfortunate.
>
> Maybe you can consider changing the order in your exception handling?
> Since you want to mark the failed exchange handled anyways.
> Wiretap new exchange fire and forget to other endpoint. Then call
> someBean with the handled exchange?
>
> onException(NullPointerException.class)
> .handled(true)
> .wireTap("someUri")
> .newExchange(exchange -> {
>
> })
> .end()
> .bean("someBean");
>
> If this isn't functionally equivalent, I'd suggest logging a ticket on
> the Camel JIRA.
>
Thanks a lot! This is not ideal, and I need to test this some more, but it
seems to work for now.
Henrik
Re: Missing handle(boolean) in Camel 2.16.0
Posted by Joakim Bjørnstad <jo...@gmail.com>.
On Mon, Oct 12, 2015 at 11:46 AM, Henrik Brautaset Aronsen
<he...@synth.no> wrote:
> On Mon, Oct 12, 2015 at 10:44 AM, Joakim Bjørnstad <jo...@gmail.com>
> wrote:
>
>> onException(NullPointerException.class)
>> .wireTap("someUri").end()
>> .handled(true)
>> .bean("someBean");
>>
>> Allows you to return to the OnExceptionDefinition.
>>
>> Seems there was a change in 2.16.0 that makes newExchange and some
>> other fluent builders to not return to the previous type in the DSL.
>>
>
> Thanks! But where do I put my .newExchange(someProcessor) now?
Well right now it doesn't seem possible in that order, which is unfortunate.
Maybe you can consider changing the order in your exception handling?
Since you want to mark the failed exchange handled anyways.
Wiretap new exchange fire and forget to other endpoint. Then call
someBean with the handled exchange?
onException(NullPointerException.class)
.handled(true)
.wireTap("someUri")
.newExchange(exchange -> {
})
.end()
.bean("someBean");
If this isn't functionally equivalent, I'd suggest logging a ticket on
the Camel JIRA.
>
> Henrik
--
Kind regards
Joakim Bjørnstad
Re: Missing handle(boolean) in Camel 2.16.0
Posted by Henrik Brautaset Aronsen <he...@synth.no>.
On Mon, Oct 12, 2015 at 10:44 AM, Joakim Bjørnstad <jo...@gmail.com>
wrote:
> onException(NullPointerException.class)
> .wireTap("someUri").end()
> .handled(true)
> .bean("someBean");
>
> Allows you to return to the OnExceptionDefinition.
>
> Seems there was a change in 2.16.0 that makes newExchange and some
> other fluent builders to not return to the previous type in the DSL.
>
Thanks! But where do I put my .newExchange(someProcessor) now?
Henrik
Re: Missing handle(boolean) in Camel 2.16.0
Posted by Joakim Bjørnstad <jo...@gmail.com>.
Hello,
onException(NullPointerException.class)
.wireTap("someUri").end()
.handled(true)
.bean("someBean");
Allows you to return to the OnExceptionDefinition.
Seems there was a change in 2.16.0 that makes newExchange and some
other fluent builders to not return to the previous type in the DSL.
On Mon, Oct 12, 2015 at 10:09 AM, Henrik Brautaset Aronsen
<he...@synth.no> wrote:
> On Mon, Oct 12, 2015 at 10:06 AM, Henrik Brautaset Aronsen <he...@synth.no>
> wrote:
>
>> But in 2.16.0 it seems like .handle(..) isn't available anymore. Any
>> suggestions on how to mark this as handled now?
>>
>
> Sorry, typo. Obviously I mean .handled(boolean).
>
> Henrik
--
Kind regards
Joakim Bjørnstad
Re: Missing handle(boolean) in Camel 2.16.0
Posted by Henrik Brautaset Aronsen <he...@synth.no>.
On Mon, Oct 12, 2015 at 10:29 AM, Claus Ibsen <cl...@gmail.com> wrote:
> You need to end that would take you back to the onException.
>
Hi Claus, thanks for the swift reply. But I don't quite get what you're
saying, could you give me an example?
Henrik
Re: Missing handle(boolean) in Camel 2.16.0
Posted by Claus Ibsen <cl...@gmail.com>.
You need to end that would take you back to the onException.
On Mon, Oct 12, 2015 at 10:09 AM, Henrik Brautaset Aronsen
<he...@synth.no> wrote:
> On Mon, Oct 12, 2015 at 10:06 AM, Henrik Brautaset Aronsen <he...@synth.no>
> wrote:
>
>> But in 2.16.0 it seems like .handle(..) isn't available anymore. Any
>> suggestions on how to mark this as handled now?
>>
>
> Sorry, typo. Obviously I mean .handled(boolean).
>
> Henrik
--
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2nd edition:
https://www.manning.com/books/camel-in-action-second-edition
Re: Missing handle(boolean) in Camel 2.16.0
Posted by Henrik Brautaset Aronsen <he...@synth.no>.
On Mon, Oct 12, 2015 at 10:06 AM, Henrik Brautaset Aronsen <he...@synth.no>
wrote:
> But in 2.16.0 it seems like .handle(..) isn't available anymore. Any
> suggestions on how to mark this as handled now?
>
Sorry, typo. Obviously I mean .handled(boolean).
Henrik