Skip to main content

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 file
    • random: Emits synthetic events generated from a user-defined JSON schema
      Select the mode using the output_mode parameter.
  • Schema-Based Random Generation
    The random mode uses JSON Schema to generate realistic test events.

  • Configurable Output
    Events are streamed to the location defined by output_json_path in newline-delimited JSON format.

  • Debug Logging
    Enable debug: 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

KeyTypeDefaultDescription
output_modestring"echo"Mode of operation: "echo" or "random"
debugbooleanfalseEnable debug logging
output_json_pathstring"./output/output.json"Path to save emitted JSON events
input_json_events_file_pathstring"./input/events.json"Path to input file for echo mode
input_json_template_file_pathstring"./input/events_template.json"Path to JSON schema template for random mode
Tip

Echo mode is great for replaying fixed data during development. Use random mode to test edge cases with synthetic variety.