You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by Vineet Goel <vi...@gmail.com> on 2017/05/16 05:38:59 UTC

CreateTopicRequest Protocol

Hi,

From the CreateTopicRequest protocol documentation here (
https://kafka.apache.org/protocol#The_Messages_CreateTopics), it looks like
we can set numPartitions=-1 and replicationFactor=-1 to unset it. My
understanding is that if I set the values as those (-1), then the topic
will be created with the default (kafka configuration) number of partitions
and the default replication factor.

However, when I send a message to create topics as explained above, I get
the following error:
org.apache.kafka.common.errors.InvalidPartitionsException: number of
partitions must be larger than 0

Any idea what I might doing wrong? Is my understanding of the protocol
incorrect?

Any help would be much appreciated. Thanks.

-Vineet