The Zusammenfügen (Join) processor merges two event streams by combining their properties. It is designed for real-time stream merging, stateful event processing, and creating unified event views from multiple sources.
Key Capabilities
- Real-time Merging: Merges streams as events arrive.
- State Tracking: Maintains the last known state of the last event from each stream.
- Custom Field Selection: Allows you to specify exactly which fields from each input stream should be included in the output event.
- Dynamic Composition: Builds composite event structures dynamically.
Requirements
The processor requires two input streams:
- First Stream: Any event stream containing at least one property.
- Second Stream: Any event stream containing at least one property.
How it Works
- The processor keeps the last event from each stream in memory.
- When a new event arrives on either stream, the processor merges the selected fields from the new event with the fields from the last known event of the other stream.
- The resulting combined event is forwarded to the next stage of the pipeline.
Note: The internal state (the last event from each stream) is cleared when the pipeline is stopped.
#### Input Stream 1
```json
{
"deviceId": "sensor01",
"temperature": 25.5,
"timestamp": 1586380104915
}
Input Stream 2
{
"location": "room1",
"humidity": 45.2,
"timestamp": 1586380104915
}
Configuration
- Ausgabefelder (Output Fields):
deviceId, temperature, location, humidity
Output Event
{
"deviceId": "sensor01",
"temperature": 25.5,
"location": "room1",
"humidity": 45.2
}