sebastienviale opened a new pull request, #22665: URL: https://github.com/apache/kafka/pull/22665
**Motivation** As part of [KIP-1238: Multi-partition support in TopologyTestDriver.](https://cwiki.apache.org/confluence/display/KAFKA/KIP-1238%3A+Multipartition+for+TopologyTestDriver+in+Kafka+Streams) `TopologyTestDriver` currently only supports input and output topics with a single partition, making it impossible to test repartition operations without falling back to EmbeddedKafkaCluster-based integration tests. This follow-up to the `TestRecord` partition support PR introduces the multi-partition execution path itself: a builder to declare topic partition counts, a planner that resolves partition counts across the topology, and a runtime that builds one task per partition and drives routing and processing. **Changes** - `TopologyTestDriverBuilder`: new entry point with declareTopic(name, partitions) and build(). Multi-partition mode activates automatically when any declared topic has more than one partition; otherwise the legacy single-task path is preserved. - `MultiPartitionTopologyPlan`: resolves the partition count of every topic, including internal repartition topics, and validates co-partitioning. - `MultiPartitionRuntime`: builds one task per (subtopology, partition) and routes/processes records accordingly. - `TopologyTestDriver`: existing constructors are deprecated in favor of `TopologyTestDriverBuilder` **Compatibility** Fully backward compatible — no existing test requires changes. Single-partition mode (no declared topics, or all declared with 1 partition) behaves exactly as today. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
