Adding Kafka header in Console producer hangs the terminal

Viewed 33

I am trying to add headers in the Kafka message for the Console producer.

I have quite big headers like JWT token for authorization.

But whenever i try to post the message with headers with this command

bin/kafka-console-producer.sh --topic APITest --bootstrap-server localhost:30001 --property parse.headers=true

And then i try to add Authorization: and then the terminal hangs and i am not able to add the actual payload.

is there any limit on the size of the header in kafka console producer. ?

UPDATE

Event sending a small header does not work through console producer. I entered a simple value in the producer key:vale\tsa I am getting

org.apache.kafka.common.KafkaException: No headers delimiter found on line number 1: 'key:vale\tsa'
at kafka.tools.ConsoleProducer$LineMessageReader.parse(ConsoleProducer.scala:374)
at kafka.tools.ConsoleProducer$LineMessageReader.readMessage(ConsoleProducer.scala:346)
at kafka.tools.ConsoleProducer$.main(ConsoleProducer.scala:50)
at kafka.tools.ConsoleProducer.main(ConsoleProducer.scala)

Best Regards, Saurav

0 Answers
Related