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?
It would help if I could spell … key.sep
erator
isn’t a valid property to configure. sep
arator
on the other hand, is:
kafka-console-producer \
--broker-list localhost:9092 \
--topic test_topic \
--property parse.key=true \
--property key.separator=,
Much better.