Edoardo,

I missed the second set of logging statements, sorry.  I thought you'd said
they were outputting the same thing. And, yes, that's a bit
counter-intuitive. Personally I almost always do it with just to routes in
the mulitcast and then any further routing or changes I put in those. And I
use blueprint for this though I'm slowly switching the Java DSL.

   <route>
        <from uri="direct:start"/>
        <multicast">
            <to uri="direct:a"/>
            <to uri="direct:c"/>
        </multicast>
    </route>

 <route>
        <from uri="direct:a"/>
        ///modify the body here
         <to uri="direct:b"/>
   </route>

   <route>
        <from uri="direct:b"/>
      ///log message here
   </route>

On Tue, Nov 1, 2016 at 12:27 PM, DariusX <dariuscoo...@gmail.com> wrote:

> Ah, I didn't understand what you were saying before.
> Your point is that these two should be synonymous, even if they're enclosed
> in a multicast()...end():
>
> 1) This...
>      .*pipeline("direct:A", "direct:B")*
>
> 2) and this...
>      .*pipeline().to("direct:C").to("direct:D").end()*
>
> but only the second one works the way you expect.
> The first one sends the same input to both routes (i.e. does not send the
> output of A to B)
>
>
> It does seem odd, and a brief test confirms the behavior you describe (
> Sample code here
> <https://github.com/DariusX/CamelSandbox/blob/master/
> CamelSandbox/src/main/java/com/zerses/camelsandbox/
> MulticastPipelinesTest.java)>
> )
>
> Looking at  the Camel code - Line 1165
> <https://github.com/apache/camel/blob/master/camel-core/
> src/main/java/org/apache/camel/model/ProcessorDefinition.java>
> , that version of pipeline(String...uri) is simply a synonym for
> to(String...uri), which would explain how it is working.
>
> Someone else would need to speak to how it *ought* to work, but I agree it
> does not seem intuitive as-is.
>
>
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.
> com/Question-on-multicast-to-pipelines-tp5789396p5789593.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>

Reply via email to