kafka.common.KafkaException: No key found on line 1
A very silly PEBCAK problem this one, but Google hits weren’t so helpful so here goes.
Running a console producer, specifying keys:
kafka-console-producer \ --broker-list localhost:9092 \ --topic test_topic \ --property parse.key=true \ --property key.seperator=, Failed when I entered a key/value:
1,foo kafka.common.KafkaException: No key found on line 1: 1,foo at kafka.tools.ConsoleProducer$LineMessageReader.readMessage(ConsoleProducer.scala:314) at kafka.tools.ConsoleProducer$.main(ConsoleProducer.scala:55) at kafka.tools.ConsoleProducer.main(ConsoleProducer.scala) kafka.common.KafkaException: No key found on line … but I specified the key, didn’t I?