We are using
KafkaTemplateto send the message to a topic called
test_topic. This will return a
ListenableFutureobject 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.