TestInputTopic
TestInputTopic is a Kafka Streams testing utility that represents an input topic and supplies records to a topology under test.
Kafka Streams in Action, Second Edition
TestInputTopic is a Kafka Streams test utility representing an input topic and providing methods for piping test records into a topology.
- How it is used
- Tests Kafka Streams topologies by injecting serialized records without requiring a live Kafka broker.
- How deep it goes
- Explains construction, serialization, input overloads, timestamp advancement, and event-time distinctions.
- Examples
- Uses value lists, keyed records, reduce outputs, timestamped transactions, and suppressed windowed results.
- What you can do after
- Apply it via TopologyTestDriver to inject records and validate topology output, state, ordering, punctuation, or window behavior.
Read how Kafka Streams in Action, Second Edition explains TestInputTopic →
Kafka for Architects
TestInputTopic is a Kafka Streams testing class that provides serialized records as input to a topology under test.
- How it is used
- Supplies serialized records to Kafka Streams topologies during isolated tests without requiring a running Kafka cluster.
- How deep it goes
- Defines topic setup, serialization, output verification, time progression, and intermediate-state inspection without detailing implementation code.
- Examples
- Uses simulated input and output topics to verify transformed records, serialized bytes, time progression, and intermediate state.
- What you can do after
- Apply it via TopologyTestDriver to inject records and verify Kafka Streams topology behavior locally.
Related concepts
- processor topologyuses · A processor topology is a directed graph of source, processor, and sink nodes that defines how records flow through a stream-processing application.
- TopologyTestDriverproduced by · TopologyTestDriver is a Kafka Streams testing utility that runs a topology in memory without requiring a running Kafka cluster.
- TestOutputTopiccontrasts with · TestOutputTopic is a Kafka Streams testing utility that represents an output topic and reads records produced by a topology under test.
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.

