Clarification Needed on NewTopic Usage with Custom Replica Assignment in Confluent Kafka Python API #1685
Unanswered
AkshatHyperion
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I am using the Confluent Kafka Python API to create topics with custom replica assignments and have encountered some confusion regarding the usage of NewTopic, specifically when setting num_partitions and replication_factor in conjunction with replica_assignment.
According to the documentation, when using replica_assignment, both num_partitions and replication_factor should be set to -1. However, when I do this, I encounter an error:
Failed to create topic: Specifying a default partition count and a replica assignment are mutually exclusive
Interestingly, when I set num_partitions to 1 instead of -1, the topic creation succeeds without any errors:
Could you please clarify the correct usage in this scenario? Is the documentation accurate, or is there an update or a specific context where num_partitions should not be -1 when using replica_assignment?
Thank you for your help!
Beta Was this translation helpful? Give feedback.
All reactions