-1

I am fairly new to resilience4j. I was wondering whether it is possible to have different failureRateThreshold settings for different kinds of exception under the same circuit breaker config. I am unable to find an example for the same. Any help will be greatly appreciated.

Ritu Das
  • 1
  • 1

2 Answers2

0

No, it's not possible. But it's an interesting idea. Why do you need it?

Robert Winkler
  • 1,734
  • 9
  • 8
0

Not possible out of the box, but you can emulate this behaviour with two different decorators: in the inner one, with one failureRateThreshold, you must ignore the exception expected by the outer decorator using ignoreExceptions. So the outer decorator will get just this exception using his own failureRateThreshold.

Alberto
  • 2,881
  • 7
  • 35
  • 66