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: Conditional Wiretapping
Date Thu, 29 Aug 2013 05:37:29 GMT
Yes the EIPs is very composable and I like to picture this as they are
like LEGO bricks and you can put them together any how you like and
construct new EIP patterns / solutions for your integration needs.

So using a filter / content based router with the wire tap can solve
this problem.

On Wed, Aug 28, 2013 at 10:24 PM, Christian Posta
<christian.posta@gmail.com> wrote:
> Maybe more like:
>
> from("direct:foo")
>    .choice()
>       .when(header(VALUE).isEqualTo(A))
>          .wireTap("direct:wireTapTbd")
>          .<anything else you want here>
>       .otherwise()
>           .to("direct:secondChoice");
>
>
> On Wed, Aug 28, 2013 at 1:08 PM, Christopher Gardner <
> chris.r.gardner@gmail.com> wrote:
>
>> Something like:
>>
>>            from("direct:foo").wireTap("direct:wireTapTbd")
>>                 .choice()
>>                 .when(header("VALUE").isEqualTo("A"))
>>                   .to("direct:firstChoice")
>>                 .otherwise()
>>                   .to("direct:secondChoice");
>>
>>
>> On Wed, Aug 28, 2013 at 3:46 PM, Dale King <dalewking@gmail.com> wrote:
>>
>> > Just wiretap to a content based router that directs it accordingly.
>> >
>> >
>> > On Wed, Aug 28, 2013 at 3:26 PM, Christopher Gardner <
>> > chris.r.gardner@gmail.com> wrote:
>> >
>> > > Is there a spring and/or Java DSL way to conditionally wiretap? Example
>> > > would be if a header has one value, I'd like to wiretap to "direct:a",
>> if
>> > > it has another value to "direct:b".  The only thing I can think of now
>> is
>> > > to wiretap to "direct:determineWhereToWiretap", which includes a
>> > processor
>> > > on the route to actually check such a header value and route
>> accordingly.
>> > >
>> >
>> >
>> >
>> > --
>> > Dale King
>> >
>>
>
>
>
> --
> *Christian Posta*
> http://www.christianposta.com/blog
> twitter: @christianposta



-- 
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

Mime
View raw message