Name
Aggregate — Aggregates many messages into a single message
Usage
The aggregate pattern uses an expression to determine which messages to aggregate into a single message. Messages that match the expression are held until they combined by the specified aggregation strategy bean.
The aggregate pattern can be placed anywhere in the body of a route.
Properties
Table 3.1 describes the properties you can specify using the properties editor.
Table 3.1. Aggregate Properties
Name | Description |
---|---|
Correlation Expression | Specifies the expression used to correlate the messages that are aggregated. |
language | Specifies the expression language used to process the expression. |
Completion Size Expression | Specifies an expression used to determine when aggregation is complete based on the number of exchanges processed. |
language | Specifies the expression language used to process the expression. |
Completion Predicate | Specifies the expression used to determine when the aggregated message is complete based on the aggregated message's contents. |
language | Specifies the expression language used to process the expression. |
Completion Timeout Expression | Specifies an expression used to determine when aggregation is complete based on the amount of time the aggregator has been inactive. |
language | Specifies the expression language used to process the expression. |
Strategy Ref | Specifies a reference for looking up the
AggregationStrategy in the registry. |
Close Correlation Key On Completion | Specifies the number of closed correlation keys stored in the cache used to determine if an exchange should be accepted. |
Completion Timeout | Specifies the amount of time, in milliseconds, the aggregator must be inactive to complete an aggregated message. The property cannot be used with Completion Interval. |
Inherit Error Handler | Specifies if the node should use the error handler configured for the route. |
Executor Service Ref | Specifies a reference for looking up the
executorService to use for
thread pool management. |
Completion Interval | Specifies an interval of time, in milliseconds, after which the aggregator completes any in process aggregate messages. This property cannot be used with Completion Timeout. |
Ignore Invalid Correlation Keys | Specifies if the aggregator ignores invalid correlation keys. The default behavior is to throw an exception. |
Aggregation Repository Ref | Specifies a reference for looking up a custom
AggregationRepository in the registry. The
AggregationRepository stores the messages while
they are held. |
Discard On Completion Timeout | Specifies whether aggregates that are completed do to a timeout are discarded. |
Completion From Batch Consumer | Specifies whether aggregates can be completed based on information from a batch consumer. |
Completion Size | Specifies the number of exchanges the aggregator processes before marking the aggregated message complete. |
Eager Check Completion | Specifies if the aggregator places the completion predicate gets access to the incoming exchange. |
Group Exchanges | Specifies if the groups all of the outgoing exchanges into a single
GroupedExchange object. |
Parallel Processing | Specifies if the aggregator processes multiple messages at a time. |
Id | Specifies a unique identifier for the endpoint. The Id can be used to refer to the endpoint in the Apache Camel configuration file. |
Description | Specifies a text description of the bean. The description is included in the generated XML file. |
Related topics
Expression and Predicates Languages |
Configuring the Fuse IDE route editor in Using Fuse IDE |