Marrying Kafka and Kotlin/Native: The Amazing Adventures of a Java Dev in Kotlin/Native
summary
A Java developer describes implementing a Kafka client for Kotlin/Native, covering what a Kafka client does and why they needed a native Kotlin implementation. The talk explains C interop challenges with a native library, how Kotlin Native coroutines differ and how to avoid common pitfalls, and how to structure a Kotlin MPP project on Gradle so the client works; it finishes with a demo using the client as a library.
AI-written summary · about
chapters (18)
- 0:00Introduction
- 1:07Kafka and Kotlin/Native
- 3:14What is a Kafka client
- 5:53Why build a Kafka client
- 6:57Project structure
- 9:50Why librdkafka
- 10:32Kotlin/Native advantages
- 13:30Kotlin/Native disadvantages
- 14:14Multiplatform setup
- 17:13Linking issues and fixes
- 19:27Variadic functions problems
- 21:17Handling varargs in interop
- 28:51Working with pointers
- 33:02Coroutines multithreading
- 38:36Consumer polling strategy
- 40:50Workers vs threads
- 43:50Live demo and code
- 48:01Q&A
related talks
43mThe Triumphs and Tribulations of Kotlin-Native in Practice
38mKotlin/Native
38mLibraries for K/N citizens
40mKMP with non-Kotlin languages
37mKotlin Multiplatform Library Development
52mKEYNOTE: Kotlin/Native – Embracing existing ecosystems
36mUsing Kotlin/JS and Kotlin/Native on Android
52mBuilding apps using Kotlin Native
