Questions tagged [circuit-breaker]

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).

385 questions
5
votes
1 answer

Hystrix fallback method does not run

I run a call to an endpoint that is off, however the hystrix does not execute the fallback method, and throws an exception: java.util.concurrent.ExecutionException: org.springframework.web.client.ResourceAccessException: I/O error on GET request…
Tiago Costa
  • 1,004
  • 4
  • 17
  • 31
5
votes
3 answers

Hystrix configuration for circuit breaker in Java

I am writing an application and I want to implement circuit breaker pattern. This is the Hystrix Command class I have written: public class HystrixCommandNextGen extends HystrixCommand { private ScriptContext scriptctx; …
Sumit Kumar
  • 402
  • 1
  • 6
  • 26
5
votes
3 answers

What are some implementations of Exception filtering in the Circuit Breaker pattern?

The Circuit Breaker pattern, from the book Release It!, protects a remote service from requests while it is failing (or recovering) and helps the client manage repeated remote service failure. I like Davy Brion’s stateful circuit breaker and…
Anthony Mastrean
  • 21,850
  • 21
  • 110
  • 188
4
votes
0 answers

How to test pybreaker and see if it works

I need to implement a circuit breaker pattern in my app so I tried doing it with PyBreaker. The app runs all properly but I don't know how can I test it and see if the breaker is working well. This is my CircuitBreakerListener class: import…
anthino12
  • 770
  • 1
  • 6
  • 29
4
votes
1 answer

How's the behaviour of circuit breaker in HALF_OPEN state (resilience4j)

Sometimes I can see a CallNotPermittedException with a message that says the circuit breaker is in HALF_OPEN state. But I don't understand how does it work in that state. I've written a test with a mock server where I have…
alegorth
  • 51
  • 1
  • 3
4
votes
0 answers

Avoid wrapping cause in NoFallbackAvailableException when using Spring Cloud Circuit Breaker

I'm using Spring Cloud Circuit Breaker 2.0.0 (resilience4j implementation) for circuit breaking in my application. Let's say a have method define like this: String doStuff() { ... // Oh no, something went wrong throw new…
Johan
  • 37,479
  • 32
  • 149
  • 237
4
votes
2 answers

Polly CircuitBreakerAsync is not working as I expect

I'm just trying out the Polly CircuitBreakerAsync and it's not working as I expect. What am I doing wrong here? I expect the code below to complete and say the circuit is still closed. using Polly; using System; using…
Chris
  • 3,081
  • 3
  • 32
  • 37
4
votes
1 answer

Resilience4j Retry+Spring Boot 2 application.yml config not applied

I'm using Resilience4j @Retry combined with @CircuitBreaker. I use annotations in SpringBoot 2 and my configuration is in application.yml. I have a fallback method in the @Retry annotation, but not in the @CircuitBreaker (That's the way to make…
Stadmina
  • 121
  • 1
  • 8
4
votes
2 answers

Rebus Circuit Breaker Implementation?

I have been working quite a bit with Rebus lately and so far it has been great. One area of concern is when we have thousands or hundreds of thousands of messages that are being processed and a dependent service, like the database or RabbitMQ, is…
Rob Packwood
  • 3,698
  • 4
  • 32
  • 48
4
votes
3 answers

Spring cloud circuit breaker - how control on what http status circuit gets opened

I am implementing circuit breaker by using Spring cloud circuit breaker abstraction https://spring.io/projects/spring-cloud-circuitbreaker with hystrix. I followed examples from here…
4
votes
2 answers

Integrating circuitbreaker, retry and timelimiter in Resilience4j

I am trying to use Resilience4j features. My use case is to combine the 3 modules: circuitbreaker retry timelimiter I want to combine all these modules and execute the method only once. Code Here is what I have tried. Supplier supplier =…
4
votes
1 answer

Use Annotation with Spring Cloud Circuit Breaker - Resilience4j

Is it possible to use Resilience4j on Spring Cloud Circuit Breaker by annotation? I can't find any documentation about it but only examples about using resilience4j by code
Ant
  • 95
  • 1
  • 7
4
votes
1 answer

Use of execution.timeout.enabled along with execution.isolation.thread.timeoutInMilliseconds in Hystrix

In our project we use the below Hystrix configuration. I am confused about command.default.execution.timeout.enabled property. It is set as false but along with it we have another property which specifies timeoutInMilliseconds, which as per my…
Syed Ammar
  • 93
  • 2
  • 6
4
votes
2 answers

How to register polly in startup file in .net core 2.2?

I am implementing polly in my .net core 2.2 application. For HttpClient there is a nuget Microsoft.Extenstions.Http.Polly which can to used to register any polly pattern (circuit breaker or retry) in startup. But how can I used polly for other…
Ask
  • 3,076
  • 6
  • 30
  • 63
4
votes
1 answer

Can a Polly Circuit Breaker have an exponential durationOfBreak?

We are trying to implement a retry policy for our database logic when we receive timeout exceptions due to exhausting the connection pool. This happens when we have a spike of unusually large activity for a small period of time. We have increased…
1 2
3
25 26