That's what you should see unless you change the data in A or in C.  A and
C should both receive START.  It is a multicast. If you change the value in
A you'll see that change in B but that will not be shown in C since C is at
the root of the multicast. If you change the data in C you'll see it in D.

Another way to think of the multicast, if this helps, is that the first
elements in the multicast are like a pub/sub or JMS topic where each of the
subscribers receive exactly the same message.

On Tue, Nov 1, 2016 at 4:49 AM, Edoardo Causarano <
edoardo.causar...@gmail.com> wrote:

> Hi all,
>
> these are the results I get, only the most explicit and verbose
> configuration returns the expected result.
>
> Working route:
> .pipeline().to("A").to("B").end()
> .pipeline().to("C").to("D").end()
>
> 10:41:12.644 [main] INFO route1 - after direct:start body=START
> 10:41:12.666 [main] DEBUG org.apache.camel.processor.SendProcessor - >>>>
> A Exchange[ID-Spitfire-local-50181-1477993271722-0-3]
> 10:41:12.667 [main] DEBUG com.esc.test.MulticastPipelinesTest - A got
> in=START
> 10:41:12.667 [main] DEBUG org.apache.camel.processor.SendProcessor - >>>>
> B Exchange[ID-Spitfire-local-50181-1477993271722-0-3]
> 10:41:12.667 [main] DEBUG com.esc.test.MulticastPipelinesTest - B got in=A
> 10:41:12.670 [main] DEBUG org.apache.camel.processor.SendProcessor - >>>>
> C Exchange[ID-Spitfire-local-50181-1477993271722-0-4]
> 10:41:12.671 [main] DEBUG com.esc.test.MulticastPipelinesTest - C got
> in=START
> 10:41:12.671 [main] DEBUG org.apache.camel.processor.SendProcessor - >>>>
> D Exchange[ID-Spitfire-local-50181-1477993271722-0-4]
> 10:41:12.671 [main] DEBUG com.esc.test.MulticastPipelinesTest - D got in=C
>
>
> Faulty routes:
> .pipeline("A", "B")
> .pipeline("C", "D”)
>
> or
>
> .to("A", "B")
> .to("C", "D")
>
> 10:43:46.383 [main] INFO route1 - after direct:start body=START
> 10:43:46.389 [main] DEBUG org.apache.camel.processor.SendProcessor - >>>>
> A Exchange[ID-Spitfire-local-50316-1477993425625-0-3]
> 10:43:46.389 [main] DEBUG com.esc.test.MulticastPipelinesTest - A got
> in=START
> 10:43:46.390 [main] DEBUG org.apache.camel.processor.SendProcessor - >>>>
> B Exchange[ID-Spitfire-local-50316-1477993425625-0-4]
> 10:43:46.390 [main] DEBUG com.esc.test.MulticastPipelinesTest - B got
> in=START
> 10:43:46.391 [main] DEBUG org.apache.camel.processor.SendProcessor - >>>>
> C Exchange[ID-Spitfire-local-50316-1477993425625-0-5]
> 10:43:46.391 [main] DEBUG com.esc.test.MulticastPipelinesTest - C got
> in=START
> 10:43:46.391 [main] DEBUG org.apache.camel.processor.SendProcessor - >>>>
> D Exchange[ID-Spitfire-local-50316-1477993425625-0-6]
> 10:43:46.391 [main] DEBUG com.esc.test.MulticastPipelinesTest - D got
> in=START
>
>
> Best,
> Edoardo
>
> > On 31 Oct 2016, at 15:04, DariusX <dariuscoo...@gmail.com> wrote:
> >
> > Your example was:
> > multicast()
> >    .pipeline("A", "B")
> >    .pipeline("C", "D")
> > .end()
> >
> > You send "START" as the body to this. So, you should expect "START" to be
> > the in.body for both "A" and "C".
> >
> > The in body for "B" will depend on what "A" does. Example: if "A"
> transforms
> > the body to a constant "Hello from A", then that is what "B" will get as
> its
> > in.body.
> >
> > Similarly, "D" will get whatever "C" decides to send along.
> >
> > If neither A nor C make any changes to the body, then you should expect
> > "START" to be the in.body for all four.
> >
> >
> >
> >
> >
> > --
> > View this message in context: http://camel.465427.n5.nabble.
> com/Question-on-multicast-to-pipelines-tp5789396p5789518.html
> > Sent from the Camel - Users mailing list archive at Nabble.com.
>
>

Reply via email to