Skip to content

Kafka: add numPartitions and replicationFactor metadata for auto topic creation#4441

Open
Akshitguptaa wants to merge 3 commits into
dapr:mainfrom
Akshitguptaa:feat/kafka-numpartitions
Open

Kafka: add numPartitions and replicationFactor metadata for auto topic creation#4441
Akshitguptaa wants to merge 3 commits into
dapr:mainfrom
Akshitguptaa:feat/kafka-numpartitions

Conversation

@Akshitguptaa

Copy link
Copy Markdown

Description

Adds numPartitions and replicationFactor metadata fields to the Kafka pubsub and binding components. When numPartitions is set (>0), Dapr creates the topic via the Kafka admin API with the given partition count before the first publish/subscribe on that topic, instead of relying only on broker auto-create.

Admin client is only created when numPartitions is actually set, so existing components with no config change see no behavior or connection difference. numPartitions is not supported with authType: awsiam and fails fast at init with a clear error instead of failing on every publish.

Issue reference

Please reference the issue this PR will close: #3110

Checklist

Please make sure you've completed the relevant tasks for this PR, out of the following list:

Note: We expect contributors to open a corresponding documentation PR in the dapr/docs repository. As the implementer, you are the best person to document your work! Implementation PRs will not be merged until the documentation PR is opened and ready for review.

@Akshitguptaa Akshitguptaa requested review from a team as code owners July 8, 2026 09:25
Signed-off-by: akshitguptaa <akshitguptaa29@gmail.com>
Signed-off-by: akshitguptaa <akshitguptaa29@gmail.com>
Signed-off-by: akshitguptaa <akshitguptaa29@gmail.com>
@Akshitguptaa Akshitguptaa force-pushed the feat/kafka-numpartitions branch from 1981428 to cebce8e Compare July 8, 2026 09:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support specifying number of partitions for Kafka pubsub component

1 participant