streamthoughts / kafka-clients-kotlin

This projects gives Kotlin bindings and several extensions for Apache Kafka Clients.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ConsumerTask should expose a method to execute an action directly on the Consumer.

fhussonnois opened this issue · comments

Motivation

Developers should be able to get an access to the Consumer instance contained in a ConsumerTask in order to perform some operations. For example to seek the consumer to a specific offset.

Proposed Change

New Public API

Add this new method the ConsumerTask class

fun <T> execute(action: (consumer: Consumer<K, V>) -> T): T