Can a producer send headers for a kafka message?

138 Views Asked by At

I need to send messages through kafka and found all the examples in "Learn by Example" very helpful. I do need to add headers to the messages I'm sending and I'm not finding examples how to add the headers when producing or read the headers when consuming. Is it possible? any examples anywhere?

1

There are 1 best solutions below

1
On

Currently Ballerina Kafka module does not support adding custom headers. I have created an issue for this feature.

Hopefully this will be supported in a near-future release.