spring-cloud / spring-cloud/spring-cloud-consul

Support retry feature in Spring Framework 7

Open
#946 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

waiting-for-triage
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.