Function internalFlushCurrentBatch, this line of code, should not be invoked if the batch builder associated with the producer is a multi batches container.
Potential Fix:
Using internalFlushCurrentBatches instead, if the associated batch builder is a multi batches container.
if p.batchBuilder.IsMultiBatches() {
p.internalFlushCurrentBatches()
} else {
p.internalFlushCurrentBatch()
}
Original Issue: apache/pulsar-client-go#749
Function internalFlushCurrentBatch, this line of code, should not be invoked if the batch builder associated with the producer is a multi batches container.
Potential Fix: Using internalFlushCurrentBatches instead, if the associated batch builder is a multi batches container.