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 2021/02/02 07:43:47 UTC

[GitHub] [pulsar] eolivelli commented on a change in pull request #9396: Compression must be applied during deferred schema preparation and enableBatching is enabled

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:
users@infra.apache.org