Skip to content
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

Move import of resilience4j-bom up to spring-cloud-dependencies #91

Closed
breun opened this issue Feb 18, 2021 · 7 comments
Closed

Move import of resilience4j-bom up to spring-cloud-dependencies #91

breun opened this issue Feb 18, 2021 · 7 comments

Comments

@breun
Copy link

breun commented Feb 18, 2021

Currently spring-cloud-circuitbreaker-dependencies imports resilience4j-bom and manages its version. However, Resilience4J provides support for more than just circuit breakers and people might also want to be able to add a module like resilience4j-bulkhead or resilience4j-ratelimiter as managed in resilience4j-bom, but without using Spring Cloud Circuit Breaker. Wouldn't it therefor make sense to move the resilience4j-bom import and management of its version up to spring-cloud-dependencies?

@ryanjbaxter
Copy link
Contributor

If you are not using Spring Cloud Circuitbreaker, then why not just manage the dependency yourself?

@breun
Copy link
Author

breun commented Feb 18, 2021

Because it's one less version number to keep up to date, and managed dependencies are a big part of the benefits of the Spring Boot ecosystem. And since Spring Cloud Circuit Breaker is already managing this, why not provide it to non-circuit breaker users as well?

@ryanjbaxter
Copy link
Contributor

It is not something Spring Cloud normally does. I will discuss it with the team.

@breun
Copy link
Author

breun commented Feb 19, 2021

Maybe Spring Cloud Circuit Breaker should be expanded and rebranded to Spring Cloud Resilience and add support for more of the resilience patterns that Resilience4J supports, as suggested in #59.

@spencergibb
Copy link
Member

so I just did a quick experiment. The spring-cloud-dependencies bom imports the circuitbreaker dependencies bom https://github.com/spring-cloud/spring-cloud-release/blob/master/spring-cloud-dependencies/pom.xml#L72

I created a simple project that imported spring-cloud-dependencies

<dependencyManagement>
	<dependencies>
		<dependency>
			<groupId>org.springframework.cloud</groupId>
			<artifactId>spring-cloud-dependencies</artifactId>
			<version>${spring-cloud.version}</version>
			<type>pom</type>
			<scope>import</scope>
		</dependency>
	</dependencies>
</dependencyManagement>

and was able to add

<dependency>
	<groupId>io.github.resilience4j</groupId>
	<artifactId>resilience4j-bulkhead</artifactId>
</dependency>

without a version and without error and use SemaphoreBulkhead in a project.

SemaphoreBulkhead semaphoreBulkhead = new SemaphoreBulkhead("mybulkhead");

So I think it already works

@ryanjbaxter
Copy link
Contributor

Thanks @spencergibb! I will close this or now since it seems doable.

@breun
Copy link
Author

breun commented Feb 21, 2021

Ah great, I missed that, thanks!

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

No branches or pull requests

4 participants