open fun subscribe(topic: String): KafkaConsumer<K, V>
Subscribe to the given topic to get dynamically assigned partitions.
Return
current KafkaConsumer instance
open fun subscribe(topics: MutableSet<String>): KafkaConsumer<K, V>
Subscribe to the given list of topics to get dynamically assigned partitions.
topics - topics to subscribe to
Return
current KafkaConsumer instance
open fun subscribe(topic: String, completionHandler: Handler<AsyncResult<Void>>): KafkaConsumer<K, V>
Subscribe to the given topic to get dynamically assigned partitions.
Due to internal buffering of messages, when changing the subscribed topic the old topic may remain in effect (as observed by the record handler}) until some time after the given completionHandler is called. In contrast, the once the given completionHandler is called the io.vertx.rxjava.kafka.client.consumer.KafkaConsumer#batchHandler will only see messages consistent with the new topic.
completionHandler - handler called on operation completed
Return
current KafkaConsumer instance
open fun subscribe(topics: MutableSet<String>, completionHandler: Handler<AsyncResult<Void>>): KafkaConsumer<K, V>
Subscribe to the given list of topics to get dynamically assigned partitions.
Due to internal buffering of messages, when changing the subscribed topics the old set of topics may remain in effect (as observed by the record handler}) until some time after the given completionHandler is called. In contrast, the once the given completionHandler is called the io.vertx.rxjava.kafka.client.consumer.KafkaConsumer#batchHandler will only see messages consistent with the new set of topics.
topics - topics to subscribe to
completionHandler - handler called on operation completed
Return
current KafkaConsumer instance