record header
A key and bytes-value pair attached to a record outside its value, used for metadata such as content type or a trace ID.
In more detail
Headers let infrastructure read routing or diagnostic information without deserializing the value. kafka-python sends them as a list of (string, bytes) tuples and returns them the same way on msg.headers.
Example
headers=[('content-type', b'application/json'), ('schema-version', b'1')]Related terms
- Kafka record — One entry in a Kafka topic, made of an optional key, a value, optional headers and a timestamp.
- event envelope — A standard outer structure that wraps an event's business payload with metadata such as event ID, type, version and time.
- trace ID — An identifier shared by every span and log line belonging to one request, so they can be found together.
- Content-Type — The header that states what format a message body is in, such as application/json.
Taught in
- Retention Deletes Files, Not Records — Confluent Apache Kafka Certifications (CCDAK and CCAAK) Exam Prep
- The Field The Registry Refused — Confluent Apache Kafka Certifications (CCDAK and CCAAK) Exam Prep
- A Sink That Died On Record Nine — Confluent Apache Kafka Certifications (CCDAK and CCAAK) Exam Prep
- Poison Messages And Dead Letter Topics — Apache Kafka & Event Streaming
- Headers, Envelopes And Event Metadata — Apache Kafka & Event Streaming