You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/06/24 13:30:26 UTC

[GitHub] [pulsar] Jason918 commented on a diff in pull request #16196: [fix][Java Client] Fix large message sometimes cannot be split into chunks after PIP-132

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


##########
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:
   There are still some metadata updates after this method, like `msgMetadata.setUuid(...)` and `msgMetadata.setChunkId().....` and even in `ProducerImpl#encryptMessage`.
   
   Can we just skip `ProducerImpl#isMessageSizeExceeded` if client chunking is enabled.



-- 
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-unsubscribe@pulsar.apache.org

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