question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Added util class to determine whether Circuit Breaker permits calls

See original GitHub issue

Given you have use case where there’s need to check Circuit Breaker state before call and consider it only if it’s able to operate on underlying service.

There’s a possibility to check state of Circuit Breaker first:

boolean canBeUsed = circuitBreaker.getState().allowPublish

All states represents this flag correctly except OPEN, which should be false, but currently is true.

Reference:

Real life example: You have list of services behind Circuit Breaker being used in Round-Robin manner. You don’t want to distribute load over service instances that are not operative to not waste time to call Circuit Breaker and doing unnecessary Retry (state is known ahead).

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:14 (14 by maintainers)

github_iconTop GitHub Comments

1reaction
RobWincommented, Oct 8, 2019

No, DISABLED means that the CircuitBreaker is disabled. That means the backend instance is not tracked anymore. But the backend instance could be available. All calls are permitted when the CircuitBreaker is disabled.

0reactions
RobWincommented, Oct 18, 2019

Thanks

Read more comments on GitHub >

github_iconTop Results From Across the Web

Java/Spring: How to find what error opened the Resilence4J ...
I am using the Resilence4j circuit breaker with Spring Boot as shown below: import io.github.resilience4j.circuitbreaker.annotation.
Read more >
Implementing a Circuit Breaker with Resilience4j - Reflectoring
The idea of circuit breakers is to prevent calls to a remote service if we know that the call is likely to fail...
Read more >
Circuit Breaker - Documentation - Akka
The Akka library provides an implementation of a circuit breaker called CircuitBreaker CircuitBreaker which has the behavior described below. What do they do?...
Read more >
CircuitBreaker - resilience4j
The CircuitBreaker uses a sliding window to store and aggregate the outcome of calls. You can choose between a count-based sliding window and...
Read more >
Electric Panel Upgrade - City of Palo Alto
This page helps you understand how to determine whether or not your ... In the City of Palo Alto, building permits are handled...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found