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-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org