Window Documentation
Version: 1.0.3
Retrieved: 2025-10-09 15:16:28
Window Module
The Window Module captures sequences of messages and produces arrays of messages on the Target Property. Either a specifed number of messages are captured in each window (Count mode) or messages can be captured during a specified time (Time mode). It is possible to get both overlapping (sliding) windows and non-overlapping (tumbling) windows, by using the Shift setting.
Settings:
| Name | Requirements | Purpose | Default |
|---|---|---|---|
| Group Property | String [0-64] | Group aggregations by each value on this property, ie create one 'window' per source. If specified, this property will be present in the output. Note that this property could be part of the source property, eg if source is 'data' the group property could be 'data.name' | |
| Source Property | String [1-64] | Property holding the values to be aggregated, could be simple values or objects. | data |
| Target Property | String [1-64] | Property to write the resulting array of messages. | data |
| Mode | Time or Count | In Count mode a specified number of messages are captured in each window. In Time mode messages are captured during the specified time for each window. | Time |
| Window Size | Integer | Size of aggregation window, specified by time or number of messages. | 1 |
| Window Shift | Integer | The distance between the start of two consecutive windows, specified by time or number of messages (Default 0 = Window size). | 0 |
| Time unit | Milliseconds, Seconds, Minutes, Hours | Sets the time unit for Window Size and Shift in Time mode. | Seconds |
| Keep properties | Bool | If true preserve properties outside the source property in the output message by copying them from the message containing the last element added to each window. | true |
| Ignore empty windows | Bool | If true the module will not send result messages for groups that had no registered values in the current time interval. | true |
Examples
Window size set to 1
Tumbling window with simple data types
Group Property =
Source Property = source
Target Property = target
Keep Properties = false
Window Size = 1
Window Shift = 0
# Input 1
{
"source": 1
}
# Output 1
{
"target": [1]
"crosser": {
"success": true
}
}
# Input 2
{
"source": 2
}
# Output 2
{
"target": [2]
"crosser": {
"success": true
}
}
Window size set to 2
Tumbling window with objects
Group Property =
Source Property = data
Target Property = target
Keep Properties = false
Window Size = 2
Window Shift = 0
# Input
{
"data": {
"source": 1
}
}
{
"data": {
"source": 2
}
}
{
"data": {
"source": 3
}
}
{
"data": {
"source": 4
}
}
# Output 1
--- NO MESSAGE ---
# Output 2
{
"target": [
{"source": 1},
{"source": 2}
]
"crosser": {
"success": true
}
}
# Output 3
--- NO MESSAGE ---
# Output 4
{
"target": [
{"source": 3},
{"source": 4}
]
"crosser": {
"success": true
}
}
`
Window shift set to 1
Sliding windows with simple data types
Group Property =
Source Property = source
Target Property = target
Keep Properties = true
Window Size = 2
Window Shift = 1
# Input 1
{
"source": 1
}
# Input 2
{
"source": 2
}
# Input 3
{
"source": 3
}
# Input 4
{
"source": 4
}
# Output 1
--- NO MESSAGE ---
# Output 2
{
"target": [1,2]
"crosser": {
"success": true
}
}
# Output 3
{
"target": [2,3]
"crosser": {
"success": true
}
}
# Output 4
{
"target": [3,4]
"crosser": {
"success": true
}
}
Search Documentation
Array Modules