vertx / io.vertx.rxjava.kafka.client.consumer / KafkaConsumer / subscribe

subscribe

open fun subscribe(topic: String): KafkaConsumer<K, V>

Subscribe to the given topic to get dynamically assigned partitions.

Parameters

topic - topic to subscribe to

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.

Parameters

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.

Parameters

topic - topic to subscribe to

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.

Parameters

topics - topics to subscribe to

completionHandler - handler called on operation completed

Return
current KafkaConsumer instance