Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AdminClient CreateTopics bug #1162

Closed
mumbi-nexon opened this issue Aug 2, 2021 · 1 comment · Fixed by #1426
Closed

AdminClient CreateTopics bug #1162

mumbi-nexon opened this issue Aug 2, 2021 · 1 comment · Fixed by #1426

Comments

@mumbi-nexon
Copy link

mumbi-nexon commented Aug 2, 2021

[2021-08-02 06:53:48,396] INFO [Admin Manager on Broker 1001]: Error processing create topic request CreatableTopic(name='testt', numPartitions=1, replicationFactor=1, assignments=[CreatableReplicaAssignment(partitionIndex=0, brokerIds=[1001, 1002]), CreatableReplicaAssignment(partitionIndex=1, brokerIds=[1002, 1003])], configs=[]) (kafka.server.AdminManager)
org.apache.kafka.common.errors.InvalidRequestException: Both numPartitions or replicationFactor and replicasAssignments were set. Both cannot be used at the same time.

kafkajs.admin sends default numPartitions and replicationFactor so when I send replicaassignment only but send default values together

@Nevon
Copy link
Collaborator

Nevon commented Jul 26, 2022

Fixed by #1305. KafkaJS now sends the default values -1 for replicationFactor and numPartitions, which is what's expected if you either want to use the default values from the cluster config, or if you are doing manual replica assignment. I have verified this in #1426.

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 a pull request may close this issue.

2 participants