Skip to main content

Module kafka_record

Module kafka_record 

Source
Expand description

Bridge between MetadataRecord and a Kafka [Record] whose value is the wincode encoding of the record.

Each MetadataRecord maps to exactly one [Record]: key = None, value = wincode(MetadataRecord). The enum variant index is the record type, so no separate type tag is carried.

Nothing in krabka writes this shape to the metadata log or sends it to an observer. The __cluster_metadata log, its snapshots, and the observer metadata fetch carry Kafka’s KIP-631 ApiMessageAndVersion frame, which crate::kraft_translate writes and reads.

Enums§

KafkaRecordError
Error decoding a Record back into a MetadataRecord.

Functions§

from_kafka_record
Decode a Kafka [Record] back into a MetadataRecord.
to_kafka_record
Encode one MetadataRecord as a Kafka [Record].