Title
Create new category
Edit page index title
Edit category
Edit link
Structured Streaming
Real-Time Mode (RTM)
Spark 4.1.1 introduces the first official support for Real-Time Mode in Structured Streaming, enabling continuous sub-second latency processing. For stateless workloads, p99 latencies can reach single-digit milliseconds.
Activation — no code changes required, just configuration:
Spark 4.1.1 RTM support matrix:
Dimension | Supported in 4.1.1 |
|---|---|
Query types | Stateless, single-stage |
Language | Scala |
Sources | Kafka |
Sinks | Kafka, Foreach |
Operators | Stateless ops, Unions, Broadcast Stream-Static Joins |
Output mode | Update |
Target latency | Sub-second (p99 single-digit ms for stateless) |
Arbitrary Stateful Processing V2
Enhances Structured Streaming with flexible custom stateful operations. Supports complex event processing, stateful ML models, and a State Data Source for reading key-value pairs from checkpoints — useful for debugging and testing streaming pipelines.
Example: