Streaming: Bounded Kafka Replay

Medium
Streaming
Kafka
Micro-batch
readStream
Uber
Databricks

Streaming: Bounded Kafka Replay

A Kafka topic orders_topic has 3 messages. Use spark.readStream with format('kafka') to read from earliest to latest offset (bounded replay).

Return topic, partition, offset, key, value sorted by offset. This simulates a micro-batch that processes all available messages once and stops.

Browser Engine: Evaluates PySpark DataFrame & SQL logic locally in Pyodide WebAssembly.

Input data

0 DataFrames

These DataFrames are passed to solve(spark, dfs). Access one with dfs['name'].

Browser engine
Loading Python editor…
Click Run to try the sample cases, or Submit to check the hidden cases. First run caches the browser Python engine (~8–15s once); all code stays on your device.