Aggregate component
The Aggregate component aggregates multiple incoming messages to one single message.
Configuration
The Aggregate component has the following configuration options:
Property | Description |
---|---|
File Type | The type of the files that are aggregated together. Currently the Aggregate component only supports XML and JSON files. |
Completion Count | The amount of messages the aggregate component should aggregate before sending them to the next component. |
Completion Interval | The 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<
>
has to be>
&
has to be&
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>