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)
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. |
|
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. |
|
open static fun create(vertx: Vertx, zookeeperHosts: String): AdminUtilsopen static fun create(vertx: Vertx, zookeeperHosts: String, autoClose: Boolean): AdminUtilsopen static fun create(vertx: Vertx, zookeeperHosts: String, connectionTimeoutMs: Int, isSecure: Boolean, autoClose: Boolean): AdminUtils
Create a new AdminUtils instance |
|
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 |
|
abstract fun deleteTopic(topicName: String, completionHandler: Handler<AsyncResult<Void>>): Unit
Delete the Kafka topic given by the topicName. |
|
abstract fun topicExists(topicName: String, completionHandler: Handler<AsyncResult<Boolean>>): Unit
Checks if the Kafka topic given by topicName does exist. |