conduktor.io ↗

KIP-863 — Reduce CompletedFetch#parseRecord() memory copy

Accepted Kafka 3.6 ClientConsumer

Adds an overloaded `Deserializer#deserialize(String, Headers, ByteBuffer)` method and updates `CompletedFetch#parseRecord()` to use `ByteBuffer` directly instead of converting to `byte[]` before deserialization. The current implementation calls `Utils.toArray(ByteBuffer)` on every record's key and value during fetch processing, causing unnecessary heap allocation and memory copy for every consumed record.

Details

AuthorLinShunKang
StatusAccepted
Kafka Version3.6
JIRAKAFKA-14944
WikiView on Apache Wiki
Created2022-08-21
Last Modified2025-01-09
Explore how this KIP affects the Kafka protocol in the Protocol Explorer, or see the full KIP database.