Where are the requests stored when the failsafe circuit breaker is open?? Does this mean if I restart my application while the circuit is open, I lose all my requests which were supposed to be re-tried? Is there a way to retrieve these messages.
The RequestHandlerCircuitBreakerAdvice
is stateless.
And even if you use RequestHandlerRetryAdvice
it doesn't store messages for future retries.
We will appreciate any inputs about state saving for the Circuit Breaker, but right now there is nothing on the matter.
I can suggest some approach based on the built-in feature - QueueChannel
with persistent MessageStore
with transactional ability to rallback message to the store back in case of downstream exception. So, you will poll message from the queue again and again until Circuit Breaker and the target service will perform without errors.