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/12/10 21:53:04 UTC

[GitHub] [pulsar-client-go] zzzming commented on issue #681: DisableBatching still go thru the batching logic and AUTO_CONSUME can not consume with correct schema type

zzzming commented on issue #681:
URL: https://github.com/apache/pulsar-client-go/issues/681#issuecomment-991325782


   @longtengz Messages flushed by the BatchBuilder's through internalFlushCurrentBatch(). Even if the batch is disabled, the message still needs to be added to a batchBuilder. When batch is disabled, here is the code that flushes individual messages at https://github.com/apache/pulsar-client-go/blob/efb102522f7c8b25d13c282512fa5a5fe2f2ae44/pulsar/producer_partition.go#L500
   
   So the current implementation is correct to create a default batch builder when the batch is disabled.
   
   However, I found a problem is if both BatchingMaxMessage and BatchingMaxSize is set to 1, no message can be added to the batch queue even if the batch is disabled. So we need to fix this to accommodate at least one message. I'll push a PR to fix this.
   
   


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

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org