vertx / io.vertx.reactivex.kafka.client.consumer / KafkaConsumer / batchHandler

batchHandler

open fun batchHandler(handler: Handler<KafkaConsumerRecords<K, V>>): KafkaConsumer<K, V>

Set the handler to be used when batches of messages are fetched from the Kafka server. Batch handlers need to take care not to block the event loop when dealing with large batches. It is better to process records individually using the io.vertx.reactivex.kafka.client.consumer.KafkaConsumer.

Parameters

handler - handler called when batches of messages are fetched

Return
current KafkaConsumer instance