Circuit breaker is a design pattern in modern software development. Circuit breaker is used to detect failures and encapsulates logic of preventing a failure to reoccur constantly (during maintenance, temporary external system failure or unexpected system difficulties).
Questions tagged [circuit-breaker]
385 questions
4
votes
1 answer
Istio circuit breaker not opening the circuit on consecutiveErrors when downstream service throws 5xx (500, 502, 503, 504) errors
I have a couple of microservices, customer-service and customer-rating-service. The first one invokes the latter.
I have placed a circuit breaker on invocations to customer-rating-service, and forced this service to always throw a 5xx error to…

codependent
- 23,193
- 31
- 166
- 308
4
votes
1 answer
How to pass data from business method to fallback method while using spring-boot circuit breaker (Hystrix)?
In official https://spring.io/guides/gs/circuit-breaker/ manual there are
business method (readingList)
fallback method (reliable)
@HystrixCommand(fallbackMethod = "reliable")
public String readingList() {
URI uri =…

arminvanbuuren
- 957
- 1
- 9
- 16
4
votes
0 answers
Configure Hystrix command per service method without using annotations
I have been exploring using Hystrix support in Spring Cloud Netflix for the service methods.
I see that there is a annotation based way of using @HystrixCommand with every service method and providing a fallback method in a attribute. I feel this…

juser
- 359
- 1
- 7
- 17
4
votes
7 answers
Hystrix fallback method is not invoked
I'm trying hystrix fallback method.
On localhost:8082, customer-service is running which returns name of the customer.
If the customer-service is down, fallback method should invoke. But it is not happening.
Below is the code snippet.
Please…

prranay
- 1,789
- 5
- 23
- 33
4
votes
1 answer
Stop Spring Cloud Stream @StreamListener from listening when target system is down
I have an application that gets messages from Kafka and calls a target system to update a legacy Oracle DB.
I want to enable a scenario where if the target system is down, to leave the messages on Kafka bus and not process them for a given period of…

odedia
- 931
- 2
- 11
- 27
3
votes
1 answer
error handling with reactiveFeignClient and CircuitBreaker
we are using reactive feign client (com.playtika.reactivefeign:feign-reactor-spring-cloud-starter:3.2.0)
circuit breaker version : org.springframework.cloud:spring-cloud-starter-circuitbreaker-reactor-resilience4j:2.1.0
and spring boot application…

Chen Avraham
- 33
- 4
3
votes
1 answer
C# and Polly - How to Unwrap IAsyncPolicy to get to the ICircuitBreakerPolicy
I am setting up Polly policies with some variant of:
Policy
.Handle()
.AdvancedCircuitBreakerAsync(failureThreshold, samplingDuration, minimumThroughput, durationOfBreak )
.WrapAsync(Policy.TimeoutAsync(timeout,…

JALLRED
- 855
- 1
- 11
- 23
3
votes
1 answer
How to get and set authorization token for calls when Circuit Breaker is enabled?
When I turn Circuit Breaker on I'm getting authentication problems from my services, because authorization token is not present in headers of request.
I found in the web that Circuit Breaker runs on secondary thread, that doesn't has spring security…

Bruno Freitas
- 321
- 3
- 13
3
votes
1 answer
What is the difference between Circuit Breaker and Connection Timeout?
From my understanding, circuit breaker is a thing that can "disconnect" a connection when there is a issue (takes a long time than usual) when communicating to other service. Instead of always retrying to communicate with broken service, it will…

Shalahuddin Al-Ayyubbi
- 388
- 2
- 14
3
votes
2 answers
Resilience4j Not Ignoring Exceptions
JobServiceImpl.java:
@CircuitBreaker(name = "jobsApiServiceGetAllJobs", fallbackMethod = "getAllJobsFallback")
public ResponseEntity getAllJobs() {
...
throw new ApiException();
}
public ResponseEntity…

Arshad Yusuf
- 519
- 1
- 5
- 11
3
votes
2 answers
Resilience4j Circuit Breaker is not working
I am facing a issue with the circuit breaker implementation using Spring Cloud Resilience4j.
Following some tutorial, I have tried to add the necessary dependencies in the project.
Also, tried to add the configurations but, still the circuit is not…

sawsb123
- 105
- 2
- 9
3
votes
1 answer
Polly CircuitBreaker - Dynamic Duration of Break
What's the correct way to modify the Duration Break on Polly?
I know in the documentation they mention implementing (PolicyRegistry).
Is there any example of this?
I was implementing Polly CircuitBreaker in one WinService.

Felipe Alves de Lima
- 33
- 2
3
votes
1 answer
Cannot implicitly convert type 'Polly.CircuitBreaker.AsyncCircuitBreaker' to 'Polly.Policy'
I am trying to create a combined resilience strategy for my Rest clients and for this I have written the following :
private static Policy circuitBreakerPolicy = Policy
.Handle()
.CircuitBreakerAsync(3,…

Golide
- 835
- 3
- 13
- 36
3
votes
0 answers
Spring boot Junit Test ResttemplateBuilder build method gives null point Exception
I am trying to cover the circuitBreaker fallback method from the below service class
@Component
public class UserService {
private static final String UNABLE_TO_CONNECT_TO_USER_SERVICE ="User service not available";
…

Pandit Biradar
- 1,777
- 3
- 20
- 35