Message Counter Documentation
Version:Â 1.1.0Â
Retrieved:Â 2025-10-09 15:16:02
Message Counter
This module counts the number of occurences of different values on a selected property within a given time period, both absolute and relative counts are calculated. Counting can be grouped per source. It can also be used to just count the number of messages received from different sources within a time period.
This module is designed to be located in the middle of a flow.
Settings
The data is grouped by the values of the Source Property and the values to count are collected from the Value Property. If Source Property is empty no grouping will be used. If Value Property is empty only the number of messages will be counted.
| Name | Requirements | Purpose | Default |
|---|---|---|---|
| Source Property | Length:Â 0-64 | The property that contains the names to group on | Â |
| Value Property | Length:Â 0-64 | The property that contains the data to count values on | Â |
| Target Property | Length:Â 0-64 | The property to write the result into. If empty the result is written to the root | Â |
| Enabled | bool | The default state of the module | true |
| Interval | 1 Second - 24 hours | The interval to collect data on | 1 Second |
Input
The input must have a property that matches the Value Property setting.
| Name | Required | Type | Description |
|---|---|---|---|
| [Value Property] | yes | string | The property that contains the data to count values on |
| [Source Property] | false | string | The property to group on |
Or
| Name | Required | Type | Description |
|---|---|---|---|
| enable | yes | bool | The new value of the enabled state |
Output
One output for each interval and value of the Source Property, if the enabled state is set to true.
| Name | Type | Description |
|---|---|---|
| msgCount | int | The number of messages in this interval |
| valueCount | object | The absolute count in the interval for each value of the Value Property |
| valueCountRel | object | The relative time in the interval for each value of the Value Property |
| [Source Property] | string | The value of the Source Property, if source property is set. |
Example
| Setting | Value |
| [Value Property] | data |
| [Source Property] | name |
| [Target Property] | result |
| Interval | 10s |
Input: Formatting example, multiple input messages of this type are typically received during a measumerment interval with different values for "data" and "name".
{
"data": "True",
"name": "machine2"
}
Output:
{
"result": {
"valueCounts": {
"False": 28,
"True": 25
},
"valueCountsRel": {
"False": 0.528,
"True": 0.472
},
"name": "machine1",
"msgCount": 53
}
}
{
"result": {
"valueCounts": {
"False": 29,
"True": 19
},
"valueCountsRel": {
"False": 0.604,
"True": 0.396
},
"name": "machine2",
"msgCount": 48
}
}
Enabling the module
By sending in messages with an enable property the state of the module can be controlled. The module will only measure on incoming messages when enabled. When changing state from "True" to "False", output messages with the current state of the measurements will be delivered, even if not at the end of an interval. When changing state from "False" to "True" a new measuring interval will be started.
Example of message to control the state:
{
"enable": "True"
}
Search Documentation
Process & Analyze
Process & Analyze
Calculations & Statistics