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


With regards,
Apache Git Services

Reply via email to