-
Notifications
You must be signed in to change notification settings - Fork 914
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ARTEMIS-4522 Dedicated thread pool for flow-control-executor #4699
Conversation
threadPool = ActiveMQClient.getGlobalThreadPool(); | ||
|
||
flowControlPool = ActiveMQClient.getFlowControlThreadPool(); //TODO add option for config |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any help/comment rg. this would be good - or deemed unneccessary?
If you set a smaller thread pool you could get other issues... you fixed one case by adding a new thread pool for flow control. When you hit another feature not working because the thread pool is saturated, are you going to add another pool to that feature also? Having a warn that the pool is saturated and suggestion to increase would probably be a better feature IMO. |
Hi,
If you reach the configured limit, I think everyone is clear that you will get delays until resources are freed. Our goal here was to address the issue that was more unexpected to us, which lead to the big 10 seconds delays based on the flow-control explicitly.
I think that would also be an excellent improvement, since now it is not easily visible when the client thread-pool reaches its limit. |
I've talked with @MrEasy (and one of his colleague's) in Slack about his use-case. This solution seems reasonable to me. If you want to constrain the "normal" thread pool but still ensure that flow-control works without extreme latency then we need something like this. In the future we could probably ditch these kinds of things using Virtual Threads. |
@MrEasy, you've got a handful of checkstyle violations:
You can check this yourself locally if you want via: mvn -Pdev install See the hacking guide for more details. Also, your commits should be squashed. |
Added test for slow consumer handling
Reduced violence and squashed |
Adds a dedicated thread pool for flow-control-executor to resolve slow-consumer-handling not being able to run in good time if common thread-pool is exhausted