conduktor.io ↗

Kafka DeleteRecords Response Wire Format v0 — Binary Protocol Layout

What is DeleteRecords?

Advances the log start offset for partitions, effectively discarding records below that offset. Used by kafka-delete-records.sh for retention compaction and GDPR data deletion; the deleted data may remain on disk until the next log segment cleanup.

Related Errors

OFFSET_OUT_OF_RANGE · TOPIC_AUTHORIZATION_FAILED · UNKNOWN_TOPIC_OR_PARTITION

Wire Diagram

Response Header
message_size int32 · 4B
correlation_id int32 · 4B
DeleteRecordsResponse v0
ThrottleTimeMs int32 · 4B
Topics array
Name string
Partitions array
PartitionIndex int32 · 4B
LowWatermark int64 · 8B
ErrorCode int16 · 2B

Schema & Example

Schema
{
  "ThrottleTimeMs": int32,
  "Topics": [{
      "Name": string,
      "Partitions": [{
          "PartitionIndex": int32,
          "LowWatermark": int64,
          "ErrorCode": int16
      }]
  }]
}
Example
{
  "ThrottleTimeMs": 0,
  "Topics": [{
      "Name": "orders",
      "Partitions": [{
          "PartitionIndex": 3,
          "LowWatermark": 0,
          "ErrorCode": 0
      }]
  }]
}