Skip to content
Kafka Is FunProgress

BeginnerCore Concepts

What is a Kafka record/message structure?

Reference answer

A Kafka record (message) consists of: key (optional, byte array — used for partitioning), value (optional, byte array — the main payload), timestamp (producer timestamp or broker ingestion time), headers (optional key-value metadata pairs, added in Kafka 0.11), topic name, partition number, and offset. Keys and values are just bytes — serialization/deserialization (String, JSON, Avro, Protobuf) is handled by the client. The broker is agnostic to the content format.

Expected key concepts: key, value, timestamp, headers, topic, partition, offset, bytes, serialization, deserialization, Avro, Protobuf