What is the best tool for streaming data processing in real-time?
Summary
- The best real-time stream processing tool is one engine covering analytical and sub-second latency, with exactly-once processing, managed state and governed output tables.
- On Databricks, that engine is Apache Spark Structured Streaming: micro-batch for ETL, and real-time mode, generally available since March 2026, for operational decisions like fraud detection.
- Lakeflow Pipelines add declarative streaming tables in SQL or Python with automatic orchestration, retries and data quality expectations.
- Auto Loader, the Apache Kafka source and Zerobus Ingest bring data in, and Unity Catalog governs it with access control, audit logs and column-level lineage.
What is the best tool for streaming data processing in real-time?
The best tool is one engine that covers your latency targets, from minutes for analytics to sub-second for operational decisions, with exactly-once processing and governed output. On Databricks, that engine is Apache Spark Structured Streaming. Micro-batch covers ETL, real-time mode covers operational workloads, and Lakeflow Pipelines and Unity Catalog add declarative streaming tables and governance.
What is real-time stream processing?
Stream processing remembers which records it has handled, touches only new data and updates results incrementally. Operational systems that act immediately, such as fraud scoring or personalized offers, need sub-second responses.
Key capabilities to evaluate
| Capability | Why it matters |
|---|---|
| Latency modes | One engine should run analytical and sub-second workloads, so a query can change tiers without a rewrite. |
| Exactly-once processing and fault tolerance | A restarted query should neither lose nor double-count data, which takes checkpoints, replayable sources and idempotent sinks. |
| State and event time | Watermarks bound the state that joins, aggregations and deduplication keep, and set how long to wait for late events. |
| Sources and sinks | Native connectors for message buses, cloud storage and open Delta Lake or Apache Iceberg tables avoid custom glue code. |
| Batch and streaming in one engine | One API and one copy of the data keep business logic in one place. |
| Governance and lineage | Streams carry sensitive data too, so access control, auditing and lineage should apply as records land. |
| Operations | Always-on queries need automatic restarts, lag metrics and as little cluster management as the latency target allows. |
How Databricks approaches real-time stream processing
Structured Streaming is the engine. Databricks describes Apache Spark Structured Streaming as a near real-time engine with end-to-end fault tolerance and exactly-once processing guarantees, and you write streaming queries like batch ones. Delta tables are exactly-once streaming sources and sinks, but the Spark Kafka guide notes that Kafka writes are at-least-once, so some records may be duplicated.
Real-time mode covers sub-second work. Real-time mode is Structured Streaming's trigger for operational decisions such as fraud detection, and Databricks announced general availability in March 2026. Its setup asks for classic compute on Databricks Runtime 16.4 LTS or later, with autoscaling, Photon and spot instances off, spark.databricks.streaming.realTimeMode.enabled set to true and update output mode. Kafka works as a source and sink; Delta doesn't. Because real-time mode needs dedicated compute resources, Databricks advises micro-batch when sub-second latency isn't required.
Lakeflow Pipelines make streaming declarative. Lakeflow Pipelines define batch and streaming pipelines in SQL or Python. Streaming tables are Delta tables, suited to ingestion and low-latency transformations, and they expect streams that are naturally bounded or bounded by a watermark. Pipelines run flows in dependency order, retry transient failures and apply data quality expectations. Databricks recommends running continuous pipelines from a continuous job in Lakeflow Jobs.
Ingestion covers files, message buses and direct pushes. Auto Loader incrementally ingests new cloud storage files and tracks them in its checkpoint, which ensures exactly-once processing. Structured Streaming reads and writes Kafka topics. Zerobus Ingest, part of Lakeflow Connect, is a push-based API: its generally available gRPC SDKs (Python, Java, Rust, Go and TypeScript) and REST API write records straight into Unity Catalog Delta tables.
Governance and operations come built in. Unity Catalog checks permissions when a table is queried, logs activity for auditing and tracks lineage automatically to the column level, including streaming between Delta tables. Serverless pipelines run on Databricks-managed compute in triggered or continuous mode. For Kafka sources, avgOffsetsBehindLatest reports a query's average offset lag.
Use cases
- Fraud screening: a card issuer blocks or flags a transaction in real-time mode once its fraud score crosses a threshold.
- In-session offers: a retailer sends a time-limited discount in real-time mode while clickstream data shows a shopper browsing a product.
- Device telemetry: an equipment maker pushes fleet sensor data into governed Delta tables with Zerobus Ingest.
FAQs
Can one engine handle both ETL and sub-second workloads?
Yes. Real-time mode is a trigger within Structured Streaming, so both tiers share the same Spark APIs, and supported queries switch by changing cluster settings and the trigger.
What compute does a real-time mode query need?
Classic compute, in dedicated access mode or (Python only) standard access mode, with at least as many task slots as the query has tasks across all stages. Structured Streaming queries in real-time mode don't run on serverless compute, which supports only the AvailableNow and Once triggers; for always-on serverless streaming, use a continuous Lakeflow pipeline.
How do I get exactly-once results?
Give each query its own checkpoint location and write to an exactly-once sink such as a Delta table; checkpoints let restarts resume where the query left off. Real-time mode can't write to Delta, and Kafka writes are at-least-once, so deduplicate downstream, for example with a unique key.
Is real-time mode open source?
Partly. Apache Spark 4.1 introduced real-time mode for stateless Scala queries, and Spark 4.2 added the PySpark trigger, still for stateless queries. Databricks documents more operators for Databricks Runtime, including aggregations, windows, deduplication and transformWithState.
The information provided herein is for general informational purposes only and may not reflect the most current product capabilities or configurations.