Spring / Resilience4j Interview questions
How do you troubleshoot a CircuitBreaker that never opens despite failures?
First check minimumNumberOfCalls against actual traffic - if it's set higher than the real call volume in the current sliding window, the failure rate is never even evaluated, so the breaker can't open no matter how bad things get.
Next verify the exception being thrown is actually being recorded: if it's wrapped or rethrown as a different type before reaching the CircuitBreaker, or if it's excluded via ignoreExceptions (or absent from a configured recordExceptions allow-list), it won't count toward the failure rate at all.
Confirm the CircuitBreaker instance is genuinely the one being used - a common mistake is configuring an instance name in application.yml that doesn't match the name attribute on the annotation, so calls silently run against an unconfigured default instance instead.
Finally, check whether the breaker's state was manually forced to DISABLED or METRICS_ONLY somewhere in the code or an admin endpoint, both of which permit every call through regardless of the failure rate.
More Related questions...