Core Spring Resilience Feature... Note
Spring

Core Spring Resilience Features: @ConcurrencyLimit, @Retryable, and RetryTemplate

This blog post announces new resilience features in Spring Framework 7.0, including concurrency throttling and retry support. Concurrency throttling helps protect resources by limiting simultaneous access, especially useful with virtual threads. This feature can be configured programmatically or declaratively using the @ConcurrencyLimit annotation. Spring Framework 7.0 also introduces built-in retry support, inspired by the Spring Retry project. Declarative retry is available via the @Retryable annotation, which can be configured with various retry policies and exception handling. Programmatic retry is offered through the RetryTemplate, allowing flexible configuration for arbitrary code blocks. Both @Retryable and RetryTemplate support customizable retry attempts, delays, and exception filtering. Notably, @Retryable is also compatible with reactive methods. Several Spring portfolio projects are migrating to this new core retry support. Developers are encouraged to try these features and provide feedback. Further details can be found in the reference manual and Javadoc.