Skip to content

Document potential resource exhaustion risk when Client is not singleton#1356

Merged
ryanjbaxter merged 1 commit intospring-cloud:mainfrom
98001yash:fix/feign-client-resource-exhaustion
Mar 30, 2026
Merged

Document potential resource exhaustion risk when Client is not singleton#1356
ryanjbaxter merged 1 commit intospring-cloud:mainfrom
98001yash:fix/feign-client-resource-exhaustion

Conversation

@98001yash
Copy link
Copy Markdown
Contributor

Problem

FeignClientFactoryBean#getTarget() resolves the Client bean from the application context. If the Client is not configured as a singleton, repeated resolution may lead to resource exhaustion (e.g., connection pools, threads), aligning with the RCTP (Repeatedly Create Thread Pool) anti-pattern.

Solution

Added a clarifying comment indicating that the Client bean should ideally be configured as a singleton to avoid potential resource exhaustion.

Impact

  • No behavioral change
  • Improves developer awareness of potential misconfiguration risks

…eton in FeignClientFactoryBean

Signed-off-by: 98001yash <yashchauhan.gaya@gmail.com>
@98001yash 98001yash force-pushed the fix/feign-client-resource-exhaustion branch from 331043a to 4a773bd Compare March 28, 2026 03:58
@github-project-automation github-project-automation bot moved this to Todo in 2025.1.2 Mar 30, 2026
@ryanjbaxter ryanjbaxter added this to the 5.0.2 milestone Mar 30, 2026
@ryanjbaxter ryanjbaxter merged commit d92cc04 into spring-cloud:main Mar 30, 2026
1 check passed
@github-project-automation github-project-automation bot moved this from Todo to Done in 2025.1.2 Mar 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants