In a Kafka message, an optional header carries technical information alongside the key, value, and timestamp. The value holds application data; the key determines partition placement, which matters when related messages must remain in order. A header serves neither role. section 2.4.1 section 2.7
Identifying a producer
If several applications produce messages, an incorrectly formatted message may be hard to trace. Adding the producing application's identifier to a header gives operators a way to identify its source and assign responsibility. section 3.2.6
Set header conventions in producer services rather than expecting the broker to interpret them. Kafka clients serialize and deserialize message components; brokers do not apply application logic to headers. section 3.2.6 section 2.4.7



