pulsar-client-go
pulsar-client-go copied to clipboard
[BUG] The capacity of dataChan is too big
Hi community. I noticed that the capacity of dataChan is too big. We make the dataChan with capacity MaxPendingMessages and the account of pending messages actual in queue may exceed the limit by MaxPendingMessages a lot.
This is because we use publishSemaphore instead of capacity of dataChan to limit pending messages. The actual limit is 2X of MaxPendingMessages.
https://github.com/apache/pulsar-client-go/blob/9867c29ca329302e97ddd9c6a99f66853c7f447f/pulsar/producer_partition.go#L148