Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

header

type

description

CamelAggregatedSize

int

The total number of Exchanges aggregated into this combined Exchange.

About AggregationStrategy

The AggregationStrategy is used for aggregate the old (lookup by its correlation id) and the new exchanges together into a single exchange. Possible implementations include performing some kind of combining or delta processing, such as adding line items together into an invoice or just using the newest exchange and removing old exchanges such as for state tracking or market data prices; where old values are of little use.

Notice the aggregation strategy is a mandatory option and must be provided to the aggregator.

About completion

When aggregation Exchanges at some point you need to indicate that the aggregated exchanges is complete, so they can be send out of the aggregator. Camel allows you to indicate completion in various ways as follows:

  • completionTimeout - Is an inactivity timeout in which is triggered if no new exchanges has been aggregated for that particular correlation key within the period.
  • 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.

Notice the completion is a mandatory option and must be provided to the aggregator.

Examples

See some examples from the old Aggregator which is somewhat similar to this new aggregator.

Include Page
CAMEL:Using This Pattern
CAMEL:Using This Pattern

...