BewareMyPower commented on code in PR #16196:
URL: https://github.com/apache/pulsar/pull/16196#discussion_r906126527


##########
pulsar-client/src/main/java/org/apache/pulsar/client/impl/ProducerImpl.java:
##########
@@ -488,6 +488,10 @@ public void sendAsync(Message<?> message, SendCallback 
callback) {
             return;
         }
 
+        // Update the message metadata before computing the payload chunk size 
to avoid a large message cannot be split
+        // into chunks.
+        final long sequenceId = updateMessageMetadata(msgMetadata, 
uncompressedSize);

Review Comment:
   IMO, it's also better to make it clear which metadata fields can be set 
before checking if the size exceeds the limit.



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