Home

Awesome

Kafka-Kotlin-Native

<img src="/kkn.png" width="174px"/>

Releases Maven Central License Build and test Lines of code Hits-of-Code GitHub repo size Run deteKT Run diKTat

Fully Native Apache Kafka client for Kotlin Native. Uses native c-interop with highly performant and reliable librdkafka C client library. This library contains no JVM dependencies, no jvm runtime required. It uses Kotlin Native memory model and Multithreaded coroutines for non-blocking interaction with native callbacks and asynchronous workers.

Contribution

We will be glad if you will test kafka-kotlin-native or contribute to this project. In case you don't have much time for this - at least spend 5 seconds to give us a star to attract other contributors!

Thanks! :pray: :partying_face:

Acknowledgement

Special thanks to those awesome developers who give us great suggestions, help us to maintain and improve this project: @olonho, @akuleshov7.

Supported platforms

The code has both common and native parts. It can be built for each platform for which librdkafka has support. Currently, this is Linux, Windows and Mac OSX.

For more information about platforms and how to install librdkafka see librdkafka installation

Dependency

The library is hosted on the Maven Central. To import kafka-kotlin-native library you need to add following dependency to your code:

<details> <summary>Maven</summary>
<dependency>
  <groupId>com.icemachined</groupId>
  <artifactId>kafka-client</artifactId>
  <version>0.2.0</version>
</dependency>
</details> <details> <summary>Gradle Groovy</summary>
implementation 'com.icemachined:kafka-client:0.2.0'
</details> <details> <summary>Gradle Kotlin</summary>
implementation("com.icemachined:kafka-client:0.2.0")
</details>

Features

How to use

See example of usage in example project This example shows how to start/stop producer and consumer and how to configure it.

Configuration