diff --git a/pulsar/producer_partition.go b/pulsar/producer_partition.go index 0f3d1983bc..31c2bd11d5 100644 --- a/pulsar/producer_partition.go +++ b/pulsar/producer_partition.go @@ -92,7 +92,7 @@ func newPartitionProducer(client *client, topic string, options *ProducerOptions topic: topic, options: options, producerID: client.rpcClient.NewProducerID(), - eventsChan: make(chan interface{}, 10), + eventsChan: make(chan interface{}, maxPendingMessages), batchFlushTicker: time.NewTicker(batchingMaxPublishDelay), publishSemaphore: make(internal.Semaphore, maxPendingMessages), pendingQueue: internal.NewBlockingQueue(maxPendingMessages),