-
Notifications
You must be signed in to change notification settings - Fork 626
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
IndexOutOfBoundsException in DirectMessageListenerContainer#adjustConsumers #703
Comments
Ha! Sure! That's definitely good catch 😄 Indeed, when we call I have just modified
|
Fixes spring-projects#703 When we adjust consumers down by more than 1 instance we end up with the `IndexOutOfBoundsException` because we perform removal by the calculated index. * Change algorithm to remove only from `0` index. In the end it doesn't matter which consumers remain in the container
Fixes #703 When we adjust consumers down by more than 1 instance we end up with the `IndexOutOfBoundsException` because we perform removal by the calculated index. * Change algorithm to remove only from `0` index. In the end it doesn't matter which consumers remain in the container
Are there any plans on the next bugfix release? Thinking about using a patched jar for our system but it would be nice to be able to avoid this. |
It's currently scheduled for next Wednesday; just in time for the Boot 2.0 release candidate 1. We could possibly pull it forward a day or two if necessary. |
Next wednesday sounds good to me. Thanks for the information! |
Our system that uses spring-amqp constantly logs this stacktrace:
Looking at the
adjustConsumers
method inDirectMessageListenerContainer
it seems like this will always happen ifnewCount < consumerList.size() - 1
, i.e. if the number of consumers is to be reduced by more than one.One solution might be to replace
with
if it does not matter which consumers will be removed.
This affects spring-rabbit 2.0.1.RELEASE.
The text was updated successfully, but these errors were encountered: