spring-cloud / spring-cloud/spring-cloud-consul
Support retry feature in Spring Framework 7
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 822
- Forks
- 539
- Avg merge
- 9h 31m
- Merged PRs (30d)
- 7
Description
Is your feature request related to a problem? Please describe.
We used spring-retry library together with Spring Cloud Consul Config in our project.
In Spring 7 spring-retry library was merged with spring-core so we removed spring-retry from the main project dependencies. However Retry functionality stopped working after that. We analyzed ConsulRetryBootstrapper in Spring Cloud Consul 5.0 and it seems that this class still relies on presence of spring-retry library and @Retryable annotation although this annotation is always present now (but package is different).
public class ConsulRetryBootstrapper implements BootstrapRegistryInitializer {
static final boolean RETRY_IS_PRESENT = ClassUtils.isPresent("org.springframework.retry.annotation.Retryable",
null);
@Override
public void initialize(BootstrapRegistry registry) {
if (!RETRY_IS_PRESENT) {
return;
}
So it's not possible to use Retry feature in Spring Cloud Consul Config if we don't have spring-retry which is obsolete now.
Describe the solution you'd like
The solution is to create another ConsulRetryBootstrapper (or update existing one) that will use built-in retry component in Spring Framework 7 so we don't need spring-retry library after that.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at ConsulRetryBootstrapper in Spring Cloud Consul 5.0 and inspect its retry-presence check and bootstrap initialization. Compare the Spring Framework 7 built-in retry annotation and package with the current spring-retry dependency path. Done means Consul Config retry works without spring-retry while existing behavior remains covered.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend, cloud
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100