You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by mm...@apache.org on 2020/06/18 18:40:29 UTC

[pulsar-client-go] branch master updated: Use maxPendingMessages for sizing producer eventsChan (#285)

This is an automated email from the ASF dual-hosted git repository.

mmerli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar-client-go.git


The following commit(s) were added to refs/heads/master by this push:
     new f6198df  Use maxPendingMessages for sizing producer eventsChan (#285)
f6198df is described below

commit f6198df59753ae1b7b671817ac2d3726dcd69741
Author: Matteo Merli <mm...@apache.org>
AuthorDate: Thu Jun 18 11:40:20 2020 -0700

    Use maxPendingMessages for sizing producer eventsChan (#285)
---
 pulsar/producer_partition.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pulsar/producer_partition.go b/pulsar/producer_partition.go
index 0f3d198..31c2bd1 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),