Yeah the aggregator is unfortunately a bit confusing and how the triggering works between size and timeout.
I have created a ticket to improve this:
I just have a quick question, if the aggregator's batch timeout is 60 seconds and there is no message come this aggregator in this first 60 seconds, does this aggregator need to generate a empty message for it ?
I do not think it should send an empty exchange. The routing logic that comes after the aggregator is very often based on that some data exists.
In fact this timeout is a bit odd, as the aggregator is about aggregate by correlation expressions so it can aggregate multiple groups. But it should only spit out the group once, when its aggregated completed.
With timeout you can get the same group multiple times. But for Camel the 2nd, 3rd ... times its a totally new group. So they are independent. For the end user point of view it might not be.
The timeout is probably added as a guard to ensure at some time the messages will continue to not wait forever.
For the moment I think I will just send my stuff to a bean that will manage the aggregation as it is quite simple.
Ok I am more confused with the aggregator now. I am receiving a message on JMS as follows:
I'm using 220.127.116.11 of the mediation router.
The aggregator have been improved in Camel 1.6.1 and the next FUSE MR 1.6.1 release as well.
You should be able to aggregate and send out a message based on timeout only.
However the batchsize should still be provided but you can set it to a very large number = 99999999.
But we should have support for setting it to 0 or a negative value to disable it. We will work on that for Camel 2.0 / 1.6.2
BTW Which version of Camel / FUSE MR are you using?
I have now implemented the feature to disable batch size by setting it to 0.
This will be in the next release, eg Camel 1.6.2 or FUSE MR 18.104.22.168
Oh sorry you have already mentioned the version you are using.
Hence it should be fixed in Camel 1.6.1 already and the next FUSE MR 22.214.171.124 release.