Tag : kafka-producer-api

I am trying to send String message using Kafka, its throwing Exception with Key of the message being null. But as far as I know the key is automatically assigned by Kafka. I am getting this error in my console. 2021-02-23 14:34:10.420 ERROR 36996 — [ad | producer-1] o.s.k.support.LoggingProducerListener : Exception thrown when sending a ..

Read more

In the windows machine, I have created a Kafka container which is up and running. I am able to post messages on to the Kafka topic by using the below producer java code. public static void main(String[] args) { // Assign topicName to string variable String topicName = "ms-txnclassification-inbox-topic"; // create instance for properties to ..

Read more

In few words, I started Kafka, created succesfully a topic, started a producer with key enabled. So far so good. I send a simple message and I get [email protected]:/# kafka-console-producer –broker-list localhost:9092 –topic testkey –property "parse.key=true" propert y "key.separator=:" >1:fisrtmessage org.apache.kafka.common.KafkaException: No key found on line 1: 1:fisrtmessage at kafka.tools.ConsoleProducer$LineMessageReader.readMessage(ConsoleProducer.scala:275) at kafka.tools.ConsoleProducer$.main(ConsoleProducer.scala:55) at kafka.tools.ConsoleProducer.main(ConsoleProducer.scala) [email protected]:/# ..

Read more