luozhenyu opened a new pull request, #15935:
URL: https://github.com/apache/kafka/pull/15935

   Related to https://issues.apache.org/jira/browse/KAFKA-16738
   
   We can write a record which is a subtype of 
[BaseRecords](https://github.com/apache/kafka/blob/trunk/clients/src/main/java/org/apache/kafka/common/record/BaseRecords.java),
 but we can not read a record which is a subtype of 
[BaseRecords](https://github.com/apache/kafka/blob/trunk/clients/src/main/java/org/apache/kafka/common/record/BaseRecords.java).
 If we change the return type of 
[Readable#readRecords](https://github.com/apache/kafka/blob/5439914c32fa00d634efa7219699f1bc21add839/clients/src/main/java/org/apache/kafka/common/protocol/Readable.java#L56)
 from MemoryRecords to BaseRecords, we can override the implementation of 
readRecords easily.
   
   We known that the MemoryRecords is based on JDK's ByteBuffer. We are 
developing a netty 
project([kroxylicious](https://github.com/kroxylicious/kroxylicious/)) and we 
want to create a subtype of BaseRecords like MemoryRecords based on netty's 
ByteBuf.
   
   ### Committer Checklist (excluded from commit message)
   - [x] Verify design and implementation 
   - [x] Verify test coverage and CI build status
   - [x] Verify documentation (including upgrade notes)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to