The Aggregate Mediator implements the Message Aggregator EIP and aggregates the messages or responses for messages split using either the clone or iterate mediators. At the same time, it can aggregate messages in the presence of matching elements specified by the correlateOn XPATH
expression. Aggregate collects the messages coming into it until the messages collected on the aggregation satisfy the completion condition. The completion condition can specify a minimum or maximum number of messages to be collected, or a timeout value in seconds, after which the aggregation terminates.
On completion of the aggregation, it will merge all collected messages and invoke the onComplete
sequence on it. The merged message will be created using the XPath expression specified by the attribute expression
on the onComplete
element.
Info | ||
---|---|---|
| ||
When the Iterate Mediator is used to split the requests and it produces only an n number of fragmented messages, the Aggregate Mediator will terminate as soon as it receives n responses, even if you have specified a higher minimum limit. |
...
Table of Contents | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
...
Syntax
...
In this example, the Mediator aggregates the responses coming in to the ESB and on completion, it sends the aggregated message through the Send Mediator.
Excerpt | ||
---|---|---|
| ||
Description of the Aggregate Mediator in WSO2 ESB. |