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

Taught in

References

Certification courses