You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by "lakshmi.prashant" <la...@sap.com> on 2014/05/30 10:37:46 UTC

Multicast - Pass through all messages, aggregate from different branches

<http://camel.465427.n5.nabble.com/file/n5751739/multicast.png> 

Hi,  

The multicast always blocks till the last message from the multicast
branches and only uses the last reply as the outgoing message, at the end of
multi-cast.

At the end of the multi-cast:
 

a) Is it possible to pass through / send each message out of each branch to
the receiver / next common steps in the main route?
 

b) Compositing Messages: If we use an aggregation strategy to join the
messages at the end of multi-cast:  

    i) if different message types emerge  from the different branches after
processing and  cannot be easily correlated, is there an easy way to
identify them as belonging to the same message and aggregate?  

    ii)  Is there an easy way to stop the aggregation on exception?
   

 iii) Is there an easy way to stop the aggregation if the messages get split
in the multicast, but had orginated from the same message at the start of
the multicast..    

	E.g. In route 1, Message A is mulicast to route 2, route 3.
 
        	In route 2, it gets split into A1, A2
          
        	In route 3, it is transformed into A3.

 
	     After  that, the aggregated messages have to be sent to route1 and
processed via some steps and then sent to the receiver.
    
	Since all the messages A1, A2, A3 originated from A after the start of the
multicast, is it possible to join A1, A2, A3 at the end of the multicast and
combine them into 1 message?

please let me know if i, ii & iii are possible?

Thanks,
Lakshmi



--
View this message in context: http://camel.465427.n5.nabble.com/Multicast-Pass-through-all-messages-aggregate-from-different-branches-tp5751739.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Multicast - Pass through all messages, aggregate from different branches

Posted by "lakshmi.prashant" <la...@sap.com>.
Hi,

 If we want a pass through of all the messages from the different branches,
is it right to use the GroupedExchangeAggregationStrategy as the
aggrgationstrategy for the multicast and use a splitter , thereafter?

If so, should a custom bean be used as the splitter (or) is it possible for
the camel splitter to automatically split the GROUPED_EXCHANGE and pass the
individual exchanges?

Pls. help.

  <bean id="groupStrategy"
class="org.apache.camel.processor.aggregate.GroupedExchangeAggregationStrategy"/>

 <route>     
           <from uri="..."/>
            <multicast strategyRef="groupStrategy" >
                     <to uri="direct://X" />
                    <to uri="direct://Y" />
            </multicast >
            <split>
                 <to uri="direct://Z" />
            </split>
  </route>

  <route>
         <from uri=="direct://X" />
          .....
  </route>

  <route>
         <from uri=="direct://Y" />
          .....
  </route>

  



Thanks,
Lakshmi



--
View this message in context: http://camel.465427.n5.nabble.com/Multicast-Pass-through-all-messages-aggregate-from-different-branches-tp5751739p5751861.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Multicast - Pass through all messages, aggregate from different branches

Posted by Claus Ibsen <cl...@gmail.com>.
On Fri, May 30, 2014 at 10:37 AM, lakshmi.prashant
<la...@sap.com> wrote:
> <http://camel.465427.n5.nabble.com/file/n5751739/multicast.png>
>
> Hi,
>
> The multicast always blocks till the last message from the multicast
> branches and only uses the last reply as the outgoing message, at the end of
> multi-cast.
>
> At the end of the multi-cast:
>
>
> a) Is it possible to pass through / send each message out of each branch to
> the receiver / next common steps in the main route?
>
>

No

> b) Compositing Messages: If we use an aggregation strategy to join the
> messages at the end of multi-cast:
>
>     i) if different message types emerge  from the different branches after
> processing and  cannot be easily correlated, is there an easy way to
> identify them as belonging to the same message and aggregate?
>
>     ii)  Is there an easy way to stop the aggregation on exception?
>

Yes read the docs

>
>  iii) Is there an easy way to stop the aggregation if the messages get split
> in the multicast, but had orginated from the same message at the start of
> the multicast..
>
>         E.g. In route 1, Message A is mulicast to route 2, route 3.
>
>                 In route 2, it gets split into A1, A2
>
>                 In route 3, it is transformed into A3.
>
>
>              After  that, the aggregated messages have to be sent to route1 and
> processed via some steps and then sent to the receiver.
>
>         Since all the messages A1, A2, A3 originated from A after the start of the
> multicast, is it possible to join A1, A2, A3 at the end of the multicast and
> combine them into 1 message?
>

Yes read the docs. You can apply a custom agg strategy on your mutlicast


> please let me know if i, ii & iii are possible?
>
> Thanks,
> Lakshmi
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Multicast-Pass-through-all-messages-aggregate-from-different-branches-tp5751739.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
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
hawtio: http://hawt.io/
fabric8: http://fabric8.io/