Aggregator must be the only one - CAMEL-393

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Aggregator must be the only one - CAMEL-393

Claus Ibsen
Hi

CAMEL-393 is related to aggregator as it must be the only output currently.

1)
Only allowed:
From(x).aggreagate(y)

2)
You can not do:
From(x).setHeader(foo).aggreagate(y)

Currently Camel will silently ignore the setHeader.

I have attached a patch to CAMEL-393 that in situation #2 will throw an exception:

java.lang.IllegalArgumentException: Aggregator must be the only output added to the route: Route[[From[seda:header]] -> [SetHeader[visited, {true}]]]
        at org.apache.camel.model.ProcessorType.aggregator(ProcessorType.java:747)
        at org.apache.camel.processor.AggregatorTest$1.configure(AggregatorTest.java:90)


Any thoughts? Do you have a better error description?

Could we commit it to 1.5? All unit tests passes.



Med venlig hilsen

Claus Ibsen
......................................
Silverbullet
Skovsgårdsvænget 21
8362 Hørning
Tlf. +45 2962 7576
Web: www.silverbullet.dk