sijie commented on a change in pull request #5045: [client] Introduce 
`batchingMaxBytes` setting in pulsar producer
URL: https://github.com/apache/pulsar/pull/5045#discussion_r317838315
 
 

 ##########
 File path: 
pulsar-client/src/main/java/org/apache/pulsar/client/impl/AbstractBatchMessageContainer.java
 ##########
 @@ -83,5 +89,9 @@ public void setProducer(ProducerImpl<?> producer) {
                 
.convertToWireProtocol(producer.getConfiguration().getCompressionType());
         this.compressor = 
CompressionCodecProvider.getCompressionCodec(compressionType);
         this.maxNumMessagesInBatch = 
producer.getConfiguration().getBatchingMaxMessages();
+        this.maxBytesInBatch = 
producer.getConfiguration().getBatchingMaxBytes();
+        if (this.maxBytesInBatch <= 0) {
+            this.maxBytesInBatch = MAX_MESSAGE_BATCH_SIZE_BYTES;
 
 Review comment:
   didn't realize MAX_MESSAGE_BATCH_SIZE_BYTES is 128KB. will fix

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


With regards,
Apache Git Services

Reply via email to