Hi ShunKang, Thanks for the KIP!
I’ve been wanting to transition toward byte buffers for a while, so this is a nice start. I thought it was a bit weird to flip the buffer inside the serializer, but I see the existing one already does that. I would have thought it would make more sense for the caller to give us a buffer already set up for reading. Do you think it makes sense to adopt this pattern for the new method? Do you plan to keep the new methods as optional indefinitely, or do you plan to ultimately replace byte[] with ByteBuffer? If it’s the latter, then it would be good to document the intent in your KIP and JavaDocs. It would be good to clarify that if a Serializer implements the new method, then the old one will never be called. That way, implementations can just throw an exception on that method instead of implementing both. Thanks again! -John On Wed, Nov 2, 2022, at 20:14, ShunKang Lin wrote: > Bump this thread again : ) > > ShunKang Lin <linshunkang....@gmail.com>于2022年9月25日 周日23:59写道: > >> Hi all, I'd like to start a new discussion thread on KIP-872 (Kafka >> Client) which proposes that add Serializer#serializeToByteBuffer() to >> reduce memory copying. >> >> KIP: >> https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=228495828 >> Thanks, ShunKang >>