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


##########
pulsar-broker/src/main/java/org/apache/pulsar/client/impl/RawBatchConverter.java:
##########
@@ -129,9 +135,14 @@ public static Optional<RawMessage> 
rebatchMessage(RawMessage msg,
                                                       
msg.getMessageIdData().getPartition(),
                                                       i);
                 if (!singleMessageMetadata.hasPartitionKey()) {
-                    messagesRetained++;
-                    
Commands.serializeSingleMessageInBatchWithPayload(singleMessageMetadata,
-                                                                      
singleMessagePayload, batchBuffer);
+                    if (retainNullKey) {

Review Comment:
   how about move this logic to filter?



-- 
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: commits-unsubscr...@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to