Hi

See
https://camel.apache.org/components/3.18.x/eips/intercept.html#_skip_sending_to_original_endpoint

On Mon, Jul 25, 2022 at 5:16 PM Vyacheslav Boyko <mail4...@gmail.com> wrote:

> Hi!
>
> My question is in subject.
>
> Picture such route:
>
> from("direct://a")
>    .routeId("route-1")
>    .to("direct://b")
>    .choice()
>      .when(ex -> /* checks */)
>        .process(ex -> /* some stuff */)
>        .stop()
>    .end()
>    .process(ex -> /* another stuff */)
> ;
>
> If I do the following in my test
>
> adviceWith(camelContext, "route-1", in ->
>                  in.interceptSendToEndpoint("direct://b")
>                          .process(exchange -> /* TEST STUFF */))
>
> Why it runs my "TEST STUFF" then goes into "direct://b" and returns into
> the main flow of route?
>
> How to exclude sending to "direct://b" at all in test and substitute it
> with advice?
>
> --
> Vyacheslav Boyko
> mailto:mail4...@gmail.com
>
>

-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2

Reply via email to