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



##########
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:
       I would prefer to keep the code simpler.
   it is already quite complicated.
   
   thanks @codelipenghui  for your review!




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