Skip to content

kafka create-partitions

Create partitions for kafka topic


Add additional partitions for a topic


kafka create-partitions
    [--site <site>]
    [--cluster <cluster>]
    --topic <topic>
    [--total_partition_count <total_partition_count>]
    [--assignment <assignment>]


site - (string)

     Site where this command will be executed
     Example: --site "site-1"
     Default:      Attributes: optional

cluster - (string)

     Name of kafka cluster
     Example: --cluster "cluster-1"
     Default: default      Attributes: optional

topic - (string)

     Name of kafka topic
     Example: --topic "topic-1"
     Default: _None_      Attributes: required

total_partition_count - (int)

     this count will be the sum of existing partitions and partitions to be created
     Example: --total_partition_count 1
     Default: _None_      Attributes: optional

assignment - (string)

     Stringified value of replica assignment array. Number of replica assignments should be equal to number of new partitions
     Example: --assignment "assignment-1"
     Default: _None_      Attributes: optional

validate_only - (bool)

     Only validate whether partition can be created with provided values
     Example: --validate_only
     Default: _None_      Attributes: optional



! kafka create-partitions "test-topic-1" --total_partition_count 5 --assignment [[1,2],[2,3]]
Partitions for the topic test-topic-1 created

Access Control

To use this command, you need access to the following:

Field Value
Action "update"
Service Type "kafka"
Service Instance cluster
Object Type "topic"
Object ID topic

Please see Access Control for details.