hangc0276 opened a new pull request #9261:
URL: https://github.com/apache/pulsar/pull/9261


   ### Motivation
   1. The `ConsumerImpl` has many unnecessary locks for thread-safe Queue, such 
as `Queues.newConcurrentLinkedQueue`, `GrowableArrayBlockingQueue`, 
`ConcurrentLinkedQueue` 
   2. For `BatchReceive` APIs, there are locks to ensure exactly less than 
batchReceive policy.
   
   ### Changes
   1. Remove unnecessary locks in `ConsumerImpl`
   2. Remove the locks in `BatchReceive` APIs, with the cost of put one message 
more than batchReceive policy, to improve consume throughput
   
   Related to PR#8207


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