vertx / io.vertx.kafka.admin / AdminUtils

# AdminUtils

`interface AdminUtils`

Provides a wrapper around important methods in Kafka's AdminUtils, namely

See Also
kafka.admin.AdminUtils#createTopic(ZkUtils, String, int, int, Properties, RackAwareMode)kafka.admin.AdminUtils#deleteTopic(ZkUtils, String)kafka.admin.AdminUtils#changeTopicConfig(ZkUtils, String, Properties)kafka.admin.AdminUtils#topicExists(ZkUtils, String)

### Functions

changeTopicConfig | `abstract fun changeTopicConfig(topicName: String, topicConfig: MutableMap<String, String>, completionHandler: Handler<AsyncResult<Void>>): Unit` Updates the configuration of the topic given by topicName. Configuration parameters are passed in as a Map (Key -> Value) of Strings.
close | `abstract fun close(completionHandler: Handler<AsyncResult<Void>>): Unit` Closes the underlying connection to Zookeeper. It is required to call the method for cleanup purposes if AdminUtils was not created with autoClose set to true.
create | `open static fun create(vertx: Vertx, zookeeperHosts: String): AdminUtils` `open static fun create(vertx: Vertx, zookeeperHosts: String, autoClose: Boolean): AdminUtils` `open static fun create(vertx: Vertx, zookeeperHosts: String, connectionTimeoutMs: Int, isSecure: Boolean, autoClose: Boolean): AdminUtils` Create a new AdminUtils instance
createTopic | `abstract 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) `abstract 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 `#createTopic(String, int, int, Handler)`, one can pass in additional configuration parameters as a map (String -> String).
deleteTopic | `abstract fun deleteTopic(topicName: String, completionHandler: Handler<AsyncResult<Void>>): Unit` Delete the Kafka topic given by the topicName.
topicExists | `abstract fun topicExists(topicName: String, completionHandler: Handler<AsyncResult<Boolean>>): Unit` Checks if the Kafka topic given by topicName does exist.