You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by al...@apache.org on 2022/10/09 10:01:15 UTC

[pulsar] branch master updated: fix InvalidMessageException throw message (#17910)

This is an automated email from the ASF dual-hosted git repository.

aloyszhang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.git


The following commit(s) were added to refs/heads/master by this push:
     new 368bf3797e7 fix InvalidMessageException throw message (#17910)
368bf3797e7 is described below

commit 368bf3797e74b09c24d3cb1d678834d3b89f84bd
Author: LinChen <15...@qq.com>
AuthorDate: Sun Oct 9 18:01:07 2022 +0800

    fix InvalidMessageException throw message (#17910)
    
    Co-authored-by: leolinchen <le...@tencent.com>
---
 .../src/main/java/org/apache/pulsar/client/impl/ProducerImpl.java     | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ProducerImpl.java b/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ProducerImpl.java
index c51562157df..e2e78671e35 100644
--- a/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ProducerImpl.java
+++ b/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ProducerImpl.java
@@ -459,9 +459,7 @@ public class ProducerImpl<T> extends ProducerBase<T> implements TimerTask, Conne
             int compressedSize = compressedPayload.readableBytes();
             if (compressedSize > ClientCnx.getMaxMessageSize() && !this.conf.isChunkingEnabled()) {
                 compressedPayload.release();
-                String compressedStr = (!isBatchMessagingEnabled() && conf.getCompressionType() != CompressionType.NONE)
-                                           ? "Compressed"
-                                           : "";
+                String compressedStr = conf.getCompressionType() != CompressionType.NONE ? "Compressed" : "";
                 PulsarClientException.InvalidMessageException invalidMessageException =
                         new PulsarClientException.InvalidMessageException(
                                 format("The producer %s of the topic %s sends a %s message with %d bytes that exceeds"