Unni Mana shows how to create a Kafka consumer and producer in the Kotlin language:
We are using
KafkaTemplateto send the message to a topic calledtest_topic. This will return aListenableFutureobject from which we can get the result of this action. This approach is the easiest one if you just want to send a message to a topic.
Generally, when we talk about the Hadoop ecosystem and functional programming languages on the Java Virtual Machine, we think Scala. But this is an example showing that Kotlin is in that discussion too.