bschofield commented on issue #437:
URL: 
https://github.com/apache/pulsar-client-go/issues/437#issuecomment-756824096


   Profiling the goroutines in my test program, at the time the send is 
stalled, results in this.
   
   ![Screenshot from 2021-01-08 
15-33-43](https://user-images.githubusercontent.com/1534502/104033053-edcde400-51c6-11eb-90bf-b3ec76fa95d7.png)
   
   Note that `partitionProducer.internalSendAsync()` is blocked on semaphore 
acquisition. Since I don't have the  `DisableBlockIfQueueFull` option sent, I 
think this must be at line 586 of _producer_partition.go_:
   
       p.publishSemaphore.Acquire()
   
   In the creation of `partitionProducer` at line 108, `publishSemaphore` is 
initialized with a size from `maxPendingMessages`:
   
       publishSemaphore: internal.NewSemaphore(int32(maxPendingMessages)),
   
   I am unclear why this semaphore size is inadequate, but this seems like it 
might be the source of the issue.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to