erobot opened a new pull request, #332:
URL: https://github.com/apache/pulsar-client-cpp/pull/332

   ### Motivation
   
   The message listener thread blocks when the receiver queue of 
`MultiTopicsConsumerImpl` is full. As message listener threads are used by all 
consumers in the same `Client`, if one slow consumer blocks the listener 
threads, all other consuemrs can no longer receive new messages.
   
   ### Modifications
   
   1. Modify `MultiTopicsConsumerImpl` to use `UnboundedBlockingQueue` to avoid 
blocking
   2. Modify the permit update logic: Increase permit only after messages 
consumed from `MultiTopicsConsumerImpl`
   
   ### Verifying this change
   
   - [ ] Make sure that the change passes the CI checks.
   
   This change added tests and can be verified as follows:
     - Add a test `testNoListenerThreadBlocking`
   
   ### Documentation
   
   <!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. -->
   
   - [ ] `doc-required` 
   (Your PR needs to update docs and you will update later)
   
   - [x] `doc-not-needed` 
   It's just an optimization.
   
   - [ ] `doc` 
   (Your PR contains doc changes)
   
   - [ ] `doc-complete`
   (Docs have been already added)
   


-- 
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.

To unsubscribe, e-mail: [email protected]

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

Reply via email to