mattisonchao commented on code in PR #20337:
URL: https://github.com/apache/pulsar/pull/20337#discussion_r1196228429


##########
pulsar-broker/src/main/java/org/apache/pulsar/client/impl/RawBatchConverter.java:
##########
@@ -92,6 +94,7 @@ public static Optional<RawMessage> rebatchMessage(RawMessage 
msg,
         checkArgument(msg.getMessageIdData().getBatchIndex() == -1);
 
         ByteBuf payload = msg.getHeadersAndPayload();
+        BrokerEntryMetadata brokerEntryMetadata = 
Commands.parseBrokerEntryMetadataIfExist(payload);

Review Comment:
   We can avoid using this method to reduce objects. (read the raw ByteBuf 
directly).



##########
pulsar-broker/src/main/java/org/apache/pulsar/client/impl/RawBatchConverter.java:
##########
@@ -92,6 +94,7 @@ public static Optional<RawMessage> rebatchMessage(RawMessage 
msg,
         checkArgument(msg.getMessageIdData().getBatchIndex() == -1);
 
         ByteBuf payload = msg.getHeadersAndPayload();
+        BrokerEntryMetadata brokerEntryMetadata = 
Commands.parseBrokerEntryMetadataIfExist(payload);

Review Comment:
   We can avoid using this method to reduce objects. (read the raw ByteBuf 
directly). :)



-- 
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