Stub Application Filter
The FilterStubApplication
is a simple synthetic filter that outputs structured events without analyzing image frames. It is ideal for testing and debugging pipelines that expect a stream of JSON events.
Features
-
Two Output Modes
echo
: Emits real events from a static JSON filerandom
: Emits synthetic events generated from a user-defined JSON schema
Select the mode using theoutput_mode
parameter.
-
Schema-Based Random Generation
Therandom
mode uses JSON Schema to generate realistic test events. -
Configurable Output
Events are streamed to the location defined byoutput_json_path
in newline-delimited JSON format. -
Debug Logging
Enabledebug: true
to activate verbose logs for insight into behavior and issues. -
Graceful Setup and Shutdown
The filter ensures proper file handling by opening and closing resources as needed.
Example Output
Each event is emitted to the output file as a single JSON line, e.g.:
{
"event_type": "EXAMPLE",
"payload": {
"field1": "value",
"field2": 123
}
}
When to Use
Use this filter when:
- You want to simulate event streams for integration or performance testing
- You want to test downstream processing logic without requiring real input data
- You want to verify pipeline stability with synthetic or controlled data
Configuration Reference
Key | Type | Default | Description |
---|---|---|---|
output_mode | string | "echo" | Mode of operation: "echo" or "random" |
debug | boolean | false | Enable debug logging |
output_json_path | string | "./output/output.json" | Path to save emitted JSON events |
input_json_events_file_path | string | "./input/events.json" | Path to input file for echo mode |
input_json_template_file_path | string | "./input/events_template.json" | Path to JSON schema template for random mode |
Echo mode is great for replaying fixed data during development. Use random mode to test edge cases with synthetic variety.