[ https://issues.apache.org/jira/browse/KAFKA-4802?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15895852#comment-15895852 ]
Armin Braun commented on KAFKA-4802: ------------------------------------ I think this is a duplicate (or sub-issue rather) of https://issues.apache.org/jira/browse/KAFKA-2045 . Making this possible will require a relatively large change as you can see if you look into the discussion there. > Support direct ByteBuffer serializers/deserializers in clients > -------------------------------------------------------------- > > Key: KAFKA-4802 > URL: https://issues.apache.org/jira/browse/KAFKA-4802 > Project: Kafka > Issue Type: New Feature > Components: clients > Reporter: Matt Sicker > > RecordAccumulator and Fetcher are already written to take advantage of a pool > of ByteBuffers, but Serializer and Deserializer require you to return a byte > array. If I have a key or value format that is better handled directly via > ByteBuffer, the added conversion to a byte array introduces unnecessary > garbage. > An example use case would be in enhancing the KafkaAppender in Log4j 2 to > support garbage free logging (or minimal garbage; I haven't really looked at > the entire code path). -- This message was sent by Atlassian JIRA (v6.3.15#6346)