Skip to content

Way of circuit breaker implementation in common webclient class #2014

Closed Answered by RobWin
lukhong asked this question in Q&A
Discussion options

You must be logged in to vote

Ok,
so the different external services are hosted and managed by different companies and thus have different failure domains, correct?
Usually I would recommend that you have a dedicated circuitbreaker instance per company. How do you load balance the traffic to different external services?
You could make use of Spring Expression Language to pick the correct circuitbreaker by using a method parameter.

@CircuitBreaker(name = "#root.args[0]")
    public String execute(String targetIdentifier) {
        return ...
    }

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@lukhong
Comment options

Answer selected by lukhong
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants