Bird
0
0

You configured a circuit breaker but fallback method is never called on failure. What is the likely cause?

medium📝 Debug Q6 of 15
Spring Boot - Advanced Patterns
You configured a circuit breaker but fallback method is never called on failure. What is the likely cause?
ACircuit breaker is not enabled in configuration
BFallback method signature does not match the original method
CService never fails so fallback is not triggered
DFallback method is private
Step-by-Step Solution
Solution:
  1. Step 1: Check fallback method signature

    Fallback method must have the same parameters plus an exception parameter to match the original method.
  2. Step 2: Effect of signature mismatch

    If signatures differ, fallback is ignored and exceptions propagate without fallback.
  3. Final Answer:

    Fallback method signature does not match the original method -> Option B
  4. Quick Check:

    Fallback signature mismatch = fallback not called [OK]
Quick Trick: Fallback signature must match original method [OK]
Common Mistakes:
  • Ignoring fallback method signature rules
  • Assuming fallback triggers without failures
  • Not enabling circuit breaker properly

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Spring Boot Quizzes