...
Option | Default | Description |
---|---|---|
correlationExpression |
| Mandatory Expression which evaluates the correlation key to use for aggregation. The Exchange which has the same correlation key is aggregated together. If the correlation key could not be evaluated an Exception is thrown. You can disable this by using the |
aggregationStrategy |
| Mandatory |
aggregationStrategyRef strategyRef |
| A reference to lookup the |
completionSize |
| Number of messages aggregated before the aggregation is complete. This option can be set as either a fixed value or using an Expression which allows you to evaluate a size dynamically - will use |
completionTimeout |
| Time in millis that an aggregated exchange should be inactive before its complete. Camel has a background task that runs once a minute to check for inactive aggregated exchanges. This option can be set as either a fixed value or using an Expression which allows you to evaluate a timeout dynamically - will use |
completionInterval |
| A repeating period in millis by which the aggregator will complete all current aggregated exchanges. Camel has a background tasks which is trigger every period. You cannot use this option together with completionTimeout, only one of the can be used. |
completionPredicate |
| A Predicate to indicate when an aggregated exchange is complete. |
completionFromBatchConsumer | | This option is if the exchanges is coming from a Batch Consumer. Then when enabled the Aggregator2 will use the batch size determined by the Batch Consumer in the message header |
eagerCheckCompletion | | Whether or not to eager check for completion when a new incoming Exchange has been received. This option influences the behavior of the |
groupExchanges | | If enabled then Camel will group all aggregated Exchanges into a single combined |
ignoreBadCorrelationKeys ignoreInvalidCorrelationKeys | | Whether or not to ignore correlation keys which could not be evaluated to a value. By default Camel will thrown an Exception, but you can enable this option and ignore the situation instead. |
closeCorrelationKeyOnCompletion |
| Whether or not too late Exchange should be accepted or not. You can enable this to indicate that if a correlation key has already been completed, then any new exchanges with the same correlation key be denied. Camel will then throw a |
aggregationRepository |
| Allows you to plugin you own implementation of |
aggregationRepositoryRef |
| Reference to lookup a |
parallelProcessing | | When aggregated are completed they are being send out of the aggregator. This option indicates whether or not Camel should use a thread pool with multiple threads for concurrency. If not custom thread pool has been specified then Camel creates a default pool with 10 concurrent threads. |
executorService |
| If using |
executorServiceRef |
| Reference to lookup a |
...
header | type | description |
---|---|---|
| int | The total number of Exchanges aggregated into this combined Exchange. |
| String | Indicator how the aggregation was completed as a value of either: |
About AggregationStrategy
...
- completionTimeout - Is an inactivity timeout in which is triggered if no new exchanges has been aggregated for that particular correlation key within the period.
- completionInterval - Once every X period all the current aggregated exchanges is completed.
- completionSize - Is a number indicating that after X aggregated exchanges its complete.
- completionPredicate - Runs a Predicate when a new exchange is aggregated to determine if we are complete or not
- completionFromBatchConsumer - Special option for Batch Consumer which allows you to complete when all the messages from the batch has been aggregated. |
Notice that all the completion ways are per correlation key. And you can combine them in any way your like. Its basically the first which triggers that wins. So you can use a completion size together with a completion timeout. Only completionTimeout and completionInterval cannot be used at the same time.
Notice the completion is a mandatory option and must be provided to the aggregator. If not provided Camel will thrown an Exception on startup.
...