-
Notifications
You must be signed in to change notification settings - Fork 41.2k
Contrary to the documentation, setting spring.jms.listener.concurrency alone configures the maximum concurrency #37180
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
Conversation
Update JMS listener concurrency configuration to set the same minimum and maximum number of consumers when users specify only the minimum using `spring.jms.listener.concurrency` property. Prior to this commit, when using `spring.jms.listener.concurrency` to set the minimum number of consumers without also specifying `spring.jms.listener.max-concurrency` would result in effective concurrency where the actual minimum number of consumers is always 1, while the maximum number of consumers is the value of `spring.jms.listener.concurrency`.
Thanks, @vpavic. I'm tempted to rework the properties a little bit as well. Given the
This is tricky due to the clash with the existing
I also wonder if There's no need for any updates to the changes proposed here. I'd like to discuss the above with the team so we can decide if and when to change things. It may be that the changes are made across different releases. |
Your If the team decides that's the way forward, I can put together a separate PR for that change as well. |
Update JMS listener concurrency configuration to set the same minimum and maximum number of consumers when users specify only the minimum using `spring.jms.listener.concurrency` property. Prior to this commit, when using `spring.jms.listener.concurrency` to set the minimum number of consumers without also specifying `spring.jms.listener.max-concurrency` would result in effective concurrency where the actual minimum number of consumers is always 1, while the maximum number of consumers is the value of `spring.jms.listener.concurrency`. See gh-37180
Thanks very much, @vpavic. |
Update JMS listener concurrency configuration to set the same minimum and maximum number of consumers when users specify only the minimum using
spring.jms.listener.concurrency
property.Prior to this commit, when using
spring.jms.listener.concurrency
to set the minimum number of consumers without also specifyingspring.jms.listener.max-concurrency
would result in effective concurrency where the actual minimum number of consumers is always 1, while the maximum number of consumers is the value ofspring.jms.listener.concurrency
.This fix results in a breaking change, however the current behavior is simply not aligned with the description of
spring.jms.listener.concurrency
property.Also see the javadoc of
DefaultMessageListenerContainer#setConcurrency
which states: