Details
-
Bug
-
Resolution: Done
-
Major
-
2.10.0-fuse-71-047
-
None
-
None
Description
If a camel route contains a aggregation strategy like below using a expression for completionSize as opposed to the value, it fails on the last line and waits for the next file to aggregate the last line of the file into new message.
from(getFileComponentString()) .split(body(String.class).tokenize("\n")) .aggregate(constant(true), new MyAggregationStrategy()) // .completionSize(2) .completionSize(constant(2)) .completionTimeout(1000L) .to(destination) .end();
In this case if the file contains 5 lines 3 aggregate messages are created if ".completionSize(2)" is used and if " .completionSize(constant(2))" is used only 2 messages are created and the last line is kept pending on receipt of another line from next file to create new aggregate message.