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 2019/10/14 07:32:56 UTC

[GitHub] [pulsar] yittg commented on a change in pull request #5165: [PIP-43] Support producer to send msg with different schema

yittg commented on a change in pull request #5165: [PIP-43] Support producer to send msg with different schema
URL: https://github.com/apache/pulsar/pull/5165#discussion_r334352968
 
 

 ##########
 File path: pulsar-client/src/main/java/org/apache/pulsar/client/impl/ProducerImpl.java
 ##########
 @@ -1312,10 +1386,16 @@ private void batchMessageAndSend() {
 
     private void processOpSendMsg(OpSendMsg op) {
         try {
-            batchMessageContainer.clear();
+            if (op.msg != null && isBatchMessagingEnabled()) {
 
 Review comment:
   `op.msg` means a single non-batch message. we should flush the current batch if needed.
   `batchMessageContainer.clear();` was moved into `batchMessageAndSend`.
   Then `processOpSendMsg` not only for batch message.
   
   Don't we need to do the flush, to keep the order or something else?

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


With regards,
Apache Git Services