Skip to content

GH-2477: Fix Static State RetryTopicConfigSupport #2479

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

Merged
merged 2 commits into from
Nov 14, 2022

Conversation

garyrussell
Copy link
Contributor

Resolves #2477

Previously, a static field was used to detect/prevent multiple instances of RetryTopicConfigurationSupport. This causes problems in test suites or when an application context might be destroyed and re-created in the same class loader.

Instead, detect and warn when multiple instances are found in an application context.

cherry-pick to 2.9.x

Resolves spring-projects#2477

Previously, a static field was used to detect/prevent multiple instances
of `RetryTopicConfigurationSupport`. This causes problems in test suites
or when an application context might be destroyed and re-created in the
same class loader.

Instead, detect and warn when multiple instances are found in an application context.

**cherry-pick to 2.9.x**
@artembilan artembilan merged commit 2f9a7f7 into spring-projects:main Nov 14, 2022
@artembilan
Copy link
Member

... and cherry-picked to 2.9.x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

java.lang.IllegalStateException: Only one 'RetryTopicConfigurationSupport' is allowed when Spring context is reloaded
2 participants