[ 
https://issues.apache.org/jira/browse/KAFKA-17861?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17943953#comment-17943953
 ] 

Siddhartha Devineni commented on KAFKA-17861:
---------------------------------------------

Hello [~shennenkamp],

Is the kip created?

Thanks

> Serialize with ByteBuffer instead of byte[]
> -------------------------------------------
>
>                 Key: KAFKA-17861
>                 URL: https://issues.apache.org/jira/browse/KAFKA-17861
>             Project: Kafka
>          Issue Type: Wish
>          Components: clients, producer 
>    Affects Versions: 3.3.2
>            Reporter: Sarah Hennenkamp
>            Priority: Minor
>              Labels: kip-required
>
> This is a request to consider changing the return value of the 
> [Serializer|https://github.com/apache/kafka/blob/trunk/clients/src/main/java/org/apache/kafka/common/serialization/Serializer.java]
>  from a byte[] to a ByteBuffer. 
>  
> Understandably folks may balk at this since it's a large lift. However, we've 
> noticed a good chunk of memory allocation in our application comes from the 
> [KafkaProducer 
> serializing|https://github.com/apache/kafka/blob/trunk/clients/src/main/java/org/apache/kafka/clients/producer/KafkaProducer.java#L1045]
>  the key and value pair. Using ByteBuffer could allow this to be off-heap and 
> save on garbage collection time.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to