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.
Wire Diagram
Response Header
message_size
int32 · 4B
correlation_id
int32 · 4B
DeleteRecordsResponse v1
ThrottleTimeMs
int32 · 4B
Name
string
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 }] }] }