Aggregating related messages
Aggregation of related messages is a frequent use case in integration. It is also one of the more complicated cases to write by hand, since it involves state, which can be lost if you are not careful, as well as considerations like timing. Camel's implementation of the Aggregator EIP abstracts away the complexity of this task, leaving you to define the following:
- How two exchanges ought to be aggregated into one. This is done by providing an implementation of an
AggregationStrategy
, which is an interface used to merge multiple exchanges together. - Which exchanges are to be aggregated with each other. This is defined by an expression that determines the grouping value from the exchange.
- When an aggregation is considered ...
Get Apache Camel Developer's Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.