vertx / io.vertx.rxjava.kafka.admin / AdminUtils / createTopic

# createTopic

`open fun createTopic(topicName: String, partitionCount: Int, replicationFactor: Int, completionHandler: Handler<AsyncResult<Void>>): Unit`

Creates a new Kafka topic on all Brokers managed by the given Zookeeper instance(s)

### Parameters

`topicName` - Name of the to-be-created topic

`partitionCount` - Number of partitions

`replicationFactor` - Number of replicates. Must be lower or equal to the number of available Brokers

`completionHandler` - vert.x callback

`open fun createTopic(topicName: String, partitionCount: Int, replicationFactor: Int, topicConfig: MutableMap<String, String>, completionHandler: Handler<AsyncResult<Void>>): Unit`

Creates a new Kafka topic on all Brokers managed by the given Zookeeper instance(s). In contrast to @see `io.vertx.rxjava.kafka.admin.AdminUtils#createTopic`, one can pass in additional configuration parameters as a map (String -> String).

### Parameters

`topicName` - Name of the to-be-created topic

`partitionCount` - Number of partitions

`replicationFactor` - Number of replicates. Must be lower or equal to the number of available Brokers

`topicConfig` - map with additional topic configuration parameters

`completionHandler` - vert.x callback