Expand description
Record-batch v2 container.
Layout (after the 12-byte log overhead):
baseOffset (8) | batchLength (4)
─────── log overhead ────────
partitionLeaderEpoch (4) | magic (1) | crc (4)
─────── CRC-covered region ────────
attributes (2) | lastOffsetDelta (4) | firstTimestamp (8)
maxTimestamp (8) | producerId (8) | producerEpoch (2)
baseSequence (4) | recordCount (4) | records[…]Structs§
- Record
Batch - A Kafka record batch (message format v2).
Enums§
- Timestamp
Type - Kafka timestamp type — derived from bit 3 of the batch
attributesfield.
Functions§
- decode_
batches - Decode every batch in a contiguous buffer.
- decode_
next_ batch - Decode the next complete batch from
buf, when one is present.