camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Louis Polycarpou <Louis.Polycar...@Sun.COM>
Subject Multicast with choice
Date Thu, 07 Aug 2008 00:13:43 GMT

I'm trying to broadcast a feed to multiple endpoints but with content-based
selection. I assume I need to use multicast, however, I can't achieve
conditional multicast based on content selection since I can't use an
otherwise() method after using multicast().to("endpoint1", "endpoint2")

Furthermore, the to() method supports a list of endpoints without requiring
a multicast first so what is the difference between that and a
multicast().to(...)?

feed in -> multicast to two outputs

To recap with code:

1) I can't use otherwise after a multicast...

        from(cnn).
                choice().
                when(xpath(filter)).multicast().to(im, archive); // I can't
now use otherwise()...

2) Do I really need multicast or can I just do the following...?

        from(cnn).
                choice().
                when(xpath(filter)).to(im, archive).
                otherwise().to(myPojo);

-- 
View this message in context: http://www.nabble.com/Multicast-with-choice-tp18861976s22882p18861976.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Mime
View raw message