codelipenghui opened a new pull request, #16670:
URL: https://github.com/apache/pulsar/pull/16670

   Fixes #16667
   
   ### Motivation
   
   Fix the consumer does not abide by the max unacks limitation.
   The root cause is the dispatcher only cares about the flow permits while
   dispatching messages but doesn't care if the dispatched messages
   will exceed the max unacks limitation.
   
   The issue is easy to reproduce if max_unacks < receiver_queue_size
   
   ### Modifications
   
   Calculate the dispatch messages count for a consumer with
   `max_unacks - unacks`
   
   ### Verifying this change
   
   A new test added to verify the consumer will not receive
   messages more than max unacks limitation
   
   ### Documentation
   
   Check the box below or label this PR directly.
   
   Need to update docs? 
   
   - [ ] `doc-required` 
   (Your PR needs to update docs and you will update later)
     
   - [x] `doc-not-needed` 
   (Please explain why)
     
   - [ ] `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