zio / zio-kafka

A Kafka client for ZIO and ZIO Streams
https://zio.dev/zio-kafka
Apache License 2.0
337 stars 138 forks source link

Fix `Consumer.fromJavaConsumer` and `Producer.fromJavaProducer` type signatures #1033

Closed devsprint closed 1 year ago

devsprint commented 1 year ago

Found the issue while trying to wrap the kafka Consumer and Producer with KafkaTelemetry to integrat Open Telemetry for tracing.

Added a pair of convenient methods.

guizmaii commented 1 year ago

@devsprint What's the diff with the functions just above yours? 🤔

devsprint commented 1 year ago

Just rely on the interface instead of implementation

devsprint commented 1 year ago

Not sure that is the best approach. maybe we can have a single method that use the interface as parameter instead of the implementation.

guizmaii commented 1 year ago

Just rely on the interface instead of implementation

Can you instead fix the previous functions? It's not good to rely on the implementation. The interfaces should have been used

devsprint commented 1 year ago

yes. I will update the branch in few minutes.

guizmaii commented 1 year ago

(BTW, I'm fixing the CI here: https://github.com/zio/zio-kafka/pull/1032. I'll merge my PR as soon as the CI passes)

guizmaii commented 1 year ago

@devsprint I fixed the CI in the master branch (sorry about that). Can you rebase your branch, please?

guizmaii commented 1 year ago

Thanks @devsprint!