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

   ### Motivation
   
   Currently, all subscriptions of one topic will do `consuemrFlow` action in a 
single thread, which is chosen by topicName:
   ```
   this.topicExecutor = 
topic.getBrokerService().getTopicOrderedExecutor().chooseThread(topicName);
   ```
   
   If there is a large number of subscriptions in a topic,  all the work will 
focus on one thread ---- the chosen thread, which will reduce the consume 
performance.  So this this patch , I'd like to choose a ramdom thread for 
`consumerFlow` in `PersistentDispatcherSingleActiveConsumer` to improve the 
consume performance.
   
   ### Modifications
   
   *  
`topic.getBrokerService().getTopicOrderedExecutor().chooseThread(topicName);` 
-> `topic.getBrokerService().getTopicOrderedExecutor().chooseThread();`
   *  `this.topicExecutor ` -> `this.executor `
   
   ### Verifying this change
   
   - [x] Make sure that the change passes the CI checks.
   
   ### Documentation
   
   <!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. -->
   
   - [ ] `doc` <!-- Your PR contains doc changes. -->
   - [ ] `doc-required` <!-- Your PR changes impact docs and you will update 
later -->
   - [x] `doc-not-needed` <!-- Your PR changes do not impact docs -->
   - [ ] `doc-complete` <!-- Docs have been already added -->
   
   ### Matching PR in forked repository
   
   PR in forked repository: 
   


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