conduktor.io ↗

KIP-646 — Serializer API should support ByteBuffer

Discussion Client

Extends the Serializer interface with a new serialize(topic, headers, data) overload returning ByteBuffer, and updates the Partitioner interface to accept ByteBuffer, enabling zero-copy serialization that avoids allocating intermediate byte arrays. Kafka's Serializer API returned only byte[], requiring a copy from any ByteBuffer-based encoder before the result could be placed in the producer record buffer.

Details

AuthorChia-Ping Tsai
StatusDiscussion
JIRAKAFKA-5761
WikiView on Apache Wiki
Created2020-07-22
Last Modified2025-05-08
Explore how this KIP affects the Kafka protocol in the Protocol Explorer, or see the full KIP database.