Hello,

i'm new to camel and i'm having a problem using the multicast option. I
defined four beans that do some calculations. They receive the number 5 and
then 

add, subtract and so on. The 5 is being sent by the bean giveMeNumber.
The problem is that in the end I don't receive the result I expect.

This is how my route looks like:

        context.addRoutes(new RouteBuilder() {
                        public void configure() {

                                from("bean:giveMeNumber?method=giveNumber")
                                                .multicast()
                                                .parallelProcessing()

                                                .to("bean:add?method=calculate")
                                                
.to("bean:subtract?method=calculate")
                                                
.to("bean:multiply?method=calculate")
                                                
.to("bean:divide?method=calculate")

                                .aggregate(new 
MyAggregator()).body().completionSize(4)
                                .to("bean:drucker?method=print");

                        }
                });

All beans act on a Double. Do I need the "MyAggregator" to aggregate 4
Doubles or is this something Camel can do on its own ?

And there's my problem. If, for example, my bean "giveNumber" returns the
number 5 the output of the printer should be like "10 0 25 1" (because
5+5=10, 

5-5=0, 5*5=25, 5/5=1). But my output is "5 5 5 5". So it seems like my
aggregator isn't appended to my .to()-beans but to my from()-bean. Is there
a 

mistake in the route-definition or do you have any ideas what my problem
could be?

Thanks for your help,

FritzGerald



--
View this message in context: 
http://camel.465427.n5.nabble.com/problem-with-aggregating-multicast-tp5736283.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to