nomisRev / kotlin-kafka

Kafka bindings for Kotlin `suspend`, and Kafka streaming operators for KotlinX Flow.
https://nomisRev.github.io/kotlin-kafka/
Apache License 2.0
106 stars 10 forks source link

Can't use `sendAwait` with Kafka's MockProducer #172

Open felixkrull-neuland opened 10 months ago

felixkrull-neuland commented 10 months ago

sendAwait is defined directly on KafkaProducer. This makes it impossible to use with Kafka's own MockProducer. The method should be defined on the Producer interface instead.

nomisRev commented 10 months ago

Hey @felixkrull-neuland,

Thank you for opening this ticket, an alternative implementation has been written for producing elements that will be released soon. It is defined on top of Producer so it should fix this issue, but I will keep this open until I've released that in a next version.

You can check out the API, and implementation here. Any feedback would be greatly appreciated, https://github.com/nomisRev/kotlin-kafka/pull/156