Skip to content

KFK-19871: A, Add Builder and Runtime for Multipartition for TopologyTestDriver#22665

Open
sebastienviale wants to merge 1 commit into
apache:trunkfrom
sebastienviale:KAFKA-19871-Multipartition-TTDriver-Add-Builder-And-Runtime
Open

KFK-19871: A, Add Builder and Runtime for Multipartition for TopologyTestDriver#22665
sebastienviale wants to merge 1 commit into
apache:trunkfrom
sebastienviale:KAFKA-19871-Multipartition-TTDriver-Add-Builder-And-Runtime

Conversation

@sebastienviale

Copy link
Copy Markdown
Contributor

Motivation

As part of KIP-1238: Multi-partition support in
TopologyTestDriver.

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.

Co-authored-by: Marie-Laure Momplot <marie-laure.momplot@michelin.com>
Co-authored-by: Julien Brunet <julien.brunet2@michelin.com>
Co-authored-by: Adam Souquieres <souquieres.adam@gmail.com>
@github-actions github-actions Bot added streams triage PRs from the community labels Jun 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

streams triage PRs from the community

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant