wix / greyhound

Greyhound - Rich Kafka client library
MIT License
517 stars 37 forks source link

Kotlin DSL #60

Open OneCricketeer opened 4 years ago

OneCricketeer commented 4 years ago

Hi again!

Any possibility there would be ever be a Kotlin library or DSL to use?

natansil commented 4 years ago

Well the underlying core code is written in Scala. But we managed to create a wrapper API with mixed Scala/Java code that can easily be called from Java code. So I think it can already be called from Kotlin code due to Java/Kotlin great interoperability.

There may be an issue with async API. Do you know what's the equivalent of Java's CompletableFuture in Kotlin? If it's usable directly than no problem here

OneCricketeer commented 4 years ago

Do you know what's the equivalent of Java's CompletableFuture in Kotlin

Coroutines?

https://github.com/Kotlin/kotlinx.coroutines/blob/master/integration/kotlinx-coroutines-jdk8/README.md#module-kotlinx-coroutines-jdk8

JohnSColeman commented 3 years ago

I used Kotlin with the Java interop and it works fine but can get messy with the exception handling code.

natansil commented 3 years ago

Can you please elaborate a bit on the issue with exception handling code.