vertx / io.vertx.kafka.client.consumer / KafkaConsumer / create

create

open static fun <K : Any, V : Any> create(vertx: Vertx, consumer: Consumer<K, V>): KafkaConsumer<K, V>

Create a new KafkaConsumer instance from a native Consumer.

Parameters

vertx - Vert.x instance to use

consumer - the Kafka consumer to wrap

Return
an instance of the KafkaConsumer

open static fun <K : Any, V : Any> create(vertx: Vertx, config: MutableMap<String, String>): KafkaConsumer<K, V>
open static fun <K : Any, V : Any> create(vertx: Vertx, config: Properties): KafkaConsumer<K, V>

Create a new KafkaConsumer instance

Parameters

vertx - Vert.x instance to use

config - Kafka consumer configuration

Return
an instance of the KafkaConsumer

open static fun <K : Any, V : Any> create(vertx: Vertx, config: MutableMap<String, String>, keyType: Class<K>, valueType: Class<V>): KafkaConsumer<K, V>
open static fun <K : Any, V : Any> create(vertx: Vertx, config: Properties, keyType: Class<K>, valueType: Class<V>): KafkaConsumer<K, V>

Create a new KafkaConsumer instance

Parameters

vertx - Vert.x instance to use

config - Kafka consumer configuration

keyType - class type for the key deserialization

valueType - class type for the value deserialization

Return
an instance of the KafkaConsumer