liveBook · Manning

TopologyTestDriver

TopologyTestDriver is a Kafka Streams testing utility that runs a topology in memory without requiring a running Kafka cluster.

How 2 Manning books explain it

Kafka Streams in Action, Second Edition

TopologyTestDriver is a Kafka Streams test utility that runs a topology in memory and provides test input, output, and state-store access.

How it is used
Tests an entire Kafka Streams topology quickly without requiring a live Kafka broker.
How deep it goes
Covers setup, record injection, output assertions, state-store inspection, and timestamp-driven behavior, while deferring broker integration to Testcontainers.
Examples
Uses a yelling topology, a stateful poker-score reducer, ordered records, state-store assertions, and timestamped window-processing records.
What you can do after
Diagnose/debug with it by piping deterministic records through a topology and comparing emitted results and state-store contents.

Read how Kafka Streams in Action, Second Edition explains TopologyTestDriver →

Kafka for Architects

TopologyTestDriver is a Kafka Streams testing class that executes and verifies a topology without requiring a running Kafka cluster.

How it is used
Validates complete Kafka Streams topologies without requiring a running Kafka cluster.
How deep it goes
Explains test topics, serialization, output assertions, simulated time, and state inspection; defers real-cluster communication to integration testing.
Examples
Uses TestInputTopic and TestOutputTopic to pipe serialized records, verify outputs, advance time, and inspect intermediate state.
What you can do after
Evaluate Kafka Streams transformations and stateful behavior without deploying a Kafka cluster.

Read how Kafka for Architects explains TopologyTestDriver →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.