Resilience4j bulkhead patterns#87
Resilience4j bulkhead patterns#87ryanjbaxter merged 4 commits intospring-cloud:masterfrom Ferioney:issue-86
Conversation
ryanjbaxter
left a comment
There was a problem hiding this comment.
We cannot make such major changes in a minor release. We need to maintain the default behavior.
I think we can optionally enable the use of a Bulkhead if resilience4j-bulkhead is on the classpath.
| <dependency> | ||
| <groupId>io.github.resilience4j</groupId> | ||
| <artifactId>resilience4j-all</artifactId> | ||
| <scope>provided</scope> |
There was a problem hiding this comment.
shouldn't this be optional?
There was a problem hiding this comment.
Why not use resilience4j-bulkhead?
There was a problem hiding this comment.
yep, changed.
resilience4j-all provides a Decorator class which is very useful for creating citcuitBreater/TimeLimiter/Bulkheads pipeline.
And resilience4j-all includes resilience4j-bulkhead module
There was a problem hiding this comment.
Do you know which module the Decorator is in? -all brings in much more than we need.
There was a problem hiding this comment.
@Ferioney how much extra code would it be to not use the decorators? I talked this over with the team and the general consensus was that we should avoid requiring extra dependencies when they are not needed.
There was a problem hiding this comment.
I think we can do it without Decorators:
Commit 870dc37 Resilience4jBulkheadProvider.java
|
@ryanjbaxter I think we can also implement support of config files in this topic (similar to the Support Resilience4J Configuration Properties ). What do you think? |
|
@Ferioney This looks good just fix the merge conflicts.
So you can configure bulkheads using configuration properties? |
# Conflicts: # spring-cloud-circuitbreaker-resilience4j/pom.xml # spring-cloud-circuitbreaker-resilience4j/src/main/java/org/springframework/cloud/circuitbreaker/resilience4j/Resilience4JAutoConfiguration.java # spring-cloud-circuitbreaker-resilience4j/src/main/java/org/springframework/cloud/circuitbreaker/resilience4j/Resilience4JCircuitBreaker.java # spring-cloud-circuitbreaker-resilience4j/src/main/java/org/springframework/cloud/circuitbreaker/resilience4j/Resilience4JCircuitBreakerFactory.java
|
@ryanjbaxter I did some major changes in PR, please review again.
|
added supporting of resilience4j bulkhead patterns
Fixes gh-86