Is Kafka written in Scala in old versions? And only Java is used in newer versions? (Old code written in Scala is not used anymore?) If yes, why the change?
Or are Scala and Java still used? If so, why does Kafka use both?
(I'm not asking if I can write producer or consumer in Scala or Java. I know Kafka clients can be written with many languages.)
The core module and Kafka Streams Scala wrapper are currently still in Scala
Clients (as of ~0.9), Kafka Connect and main Streams API are in Java
why does Kafka use both?
Typically because Scala has nicer functional APIs and object typing semantics that are more dificult to work with in (prior) Java versions.
You can review all the code here - https://github.com/apache/kafka
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With