codelipenghui commented on a change in pull request #9396:
URL: https://github.com/apache/pulsar/pull/9396#discussion_r569110035



##########
File path: 
pulsar-client/src/main/java/org/apache/pulsar/client/impl/ProducerImpl.java
##########
@@ -383,11 +394,12 @@ public void sendAsync(Message<?> message, SendCallback 
callback) {
 
         // If compression is enabled, we are compressing, otherwise it will 
simply use the same buffer
         ByteBuf compressedPayload = payload;
+        boolean compressed = false;
         // Batch will be compressed when closed
         // If a message has a delayed delivery time, we'll always send it 
individually
         if (!isBatchMessagingEnabled() || msgMetadata.hasDeliverAtTime()) {

Review comment:
       @eolivelli Is change to `!isBatchMessagingEnabled() || 
msgMetadata.hasDeliverAtTime() || isSchemaReady` works? It's not a big problem, 
I just noticed the `compressed` passed to the following methods, if we can make 
the compression works here for the multiple schema producer, I think we can 
void pass the `compressed`.
   
   The change looks good to me.




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

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


Reply via email to