-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[improve][broker] Choose random thread for consumerFlow in Persistent…
…DispatcherSingleActiveConsumer (#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`
- Loading branch information
Showing
1 changed file
with
8 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters