-
Notifications
You must be signed in to change notification settings - Fork 301
Description
I am working on extending an open source application for distributed data exchange that uses failsafe. One thing the application does is serve as a mediator, accepting and persisting HTTP requests that it needs to relay to other instances at scale.
For this, the application persists requests to a local database (used similarly to a work queue), and moves them through a state machine. There may be hundreds of requests to dozens of remote servers waiting there to be fulfilled. If the remote server can't be reached, we need to figure out what behaviour to implement for resilience. Potentially this could involve a few cycles of fast retry, after which we just leave that request in the database in its current state, to be processed again later. For that, it might be useful to be able to extract the retry and circuit breaker state to persist it to the database.
e.g.
Failsafe.with(retryPolicy).withStateFrom(jsonString)...