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



##########
File path: 
pulsar-client/src/main/java/org/apache/pulsar/client/impl/ProducerImpl.java
##########
@@ -365,6 +365,21 @@ public void addCallback(MessageImpl<?> msg, SendCallback 
scb) {
         }
     }
 
+    /**
+     * Compress the payload if compression is configured
+     * @param payload
+     * @return a new payload
+     */
+    private ByteBuf applyCompression(ByteBuf payload) {
+        if (conf.getCompressionType() != CompressionType.NONE) {

Review comment:
       Sure. I will simplify this method




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