kcat
kcat copied to clipboard
Setting message headers when piping in messages
kafkacat can set message headers in producer mode with the -H <header=value>
option. If I'm piping in messages to kafkacat to produce to a topic, is there a way that I can set the message headers as part of the input stream instead? Sort of like how a delimiter can be used to separate the message key and value?
I'm trying to send a trace ID with my messages, so a static header isn't sufficient. Here's a post about tracing with Kafka and Jaeger: Distributed Tracing with Apache Kafka and Jaeger.
On further thought, I think what I really need is the ability to produce using JSON message envelopes.