OK dumb question time: This is a bit :stackoverflo...
# announcements
s
OK dumb question time: This is a bit stackoverflow-ey but I have an existing implementation of an http-client for communicating with a third party. We are having lots of issues with them having unpredictable downtime so I figured I would implement a circuit breaker to prevent us from hammering them when they are down. Looks like
resilience4j
is the best option for that. That being said I am having a hard time understanding how to register a method call with the circuit breaker. It looks like one has to change the implementation to be a
Supplier / Runnable / Function / CheckedRunnable / CheckedFunction
and I am not particularly familiar with any of those. My function is basically a wrapper around
RestTemplate::exchange
so I think
Function
is the appropriate choice. Or am I approaching this entirely wrong and should I be decorating something entirely different with the circuit breaker? Note: I realize this isn't really a K specific question, I can take it down if it violates some rules
google 1
stackoverflow 2