Skip to content

Commit

Permalink
Use maxPendingMessages for sizing producer eventsChan (#285)
Browse files Browse the repository at this point in the history
  • Loading branch information
merlimat authored Jun 18, 2020
1 parent 1e00fb6 commit f6198df
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pulsar/producer_partition.go
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit f6198df

Please sign in to comment.