Skip to main content
Version: 4.11.0

Aggregate component

The Aggregate component aggregates multiple incoming messages to one single message.

Configuration

The Aggregate component has the following configuration options:

PropertyDescription
File TypeThe type of the files that are aggregated together. Currently the Aggregate component only supports XML and JSON files.
Completion CountThe amount of messages the aggregate component should aggregate before sending them to the next component.
Completion Count TimeoutThe timeout in miliseconds for the Completion Count option. This is the amount of time the component should wait before the count is reached. The timeout starts when the component is inactive and resets when it becomes active again.
Completion IntervalThe amount of miliseconds the aggregate component should wait before sending the aggregated message to the next component.

Remarks

  • For XML aggregation the component creates a new root element named Aggregate to produce a valid XML file.
  • For XML aggregation use of valid XML file is necessary. It is important to escape invalid characters in the text of the XML elements. These are the invalid XML characters and their escaped equivalents:
    • < has to be &lt;
    • > has to be &gt;
    • & has to be &amp;

Examples

When the Completion Count would be set on 2 and the flow would receive 4 single XML files the result would look like this:

File 1:

<Aggregated>
<Movie>
<Title>Deadpool</Title>
<Producer>Marvel Entertainment</Producer>
<Release_Date>February 8, 2016</Release_Date>
<Duration>108 Minutes</Duration>
</Movie>
<Movie>
<Title>Captain America: Civil War</Title>
<Producer>Marvel Studios</Producer>
<Release_Date>April 12, 2016</Release_Date>
<Duration>147 Minutes</Duration>
</Movie>
</Aggregated>

File 2:

<Aggregated>
<Movie>
<Title>Star Wars: The Force Awakens</Title>
<Producer>Lucasfilm Ltd.</Producer>
<Release_Date>December 14, 2015</Release_Date>
<Duration>136 Minutes</Duration>
</Movie>
<Movie>
<Title>Suicide Squad</Title>
<Producer>DC Entertainment</Producer>
<Release_Date>August 1, 2016</Release_Date>
<Duration>123 Minutes</Duration>
</Movie>
</Aggregated>