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

# batchHandler

`abstract 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 `record handler`.

### Parameters

`handler` - handler called when batches of messages are fetched

Return
current KafkaConsumer instance