Skip to main content
Advancedhow it works

How does Spark Structured Streaming read Kafka and recover after a failure?

Source: Apache Kafka documentation: introduction and design

Quick answerFree

Each micro-batch reads an offset range per partition. Spark writes the planned offsets and completed batches to the checkpoint location (write-ahead log), so after a restart it re-runs the unfinished batch from the same offsets.

Detailed answer· 56 words

Pro

Unlock the full answer with Pro

Get a 56-word model answer, 4 key points and a visual explainer, plus 25 more Apache Kafka questions.

Key points· 4 points

Pro
Unlock with Pro

Visual explainer· animated, step by step

Pro
Unlock with Pro

+ 25 more Apache Kafka questions in Pro, each with the full answer.

Discussion