Package-level declarations
Types
A CircuitBreaker is used to protect
resources or services from being overloaded When a service is being overloaded, interacting with it more will only worsen its overloaded state. Especially when combined with retry mechanisms such as Schedule, in some cases simply using a back-off retry policy might not be sufficient during peak traffics.
The saga design pattern is a way to manage data consistency across microservices in distributed transaction scenarios. A Saga is useful when you need to manage data in a consistent manner across services in distributed transaction scenarios. Or when you need to compose multiple actions
with a compensation
that needs to run in a transaction like style.
Marker object to protect SagaScope.saga from calling SagaScope.bind in its action
step.
DSL Marker for the SagaEffect DSL
Functions
Retries action using any E that occurred as the input to the Schedule. It will throw the last exception if the Schedule is exhausted, and ignores the output of the Schedule.
Retries collection of the given flow when an exception occurs in the upstream flow based on a decision by the schedule. This operator is transparent to exceptions that occur in downstream flow and does not retry on exceptions that are thrown to cancel the flow.
Retries action using any E that occurred as the input to the Schedule. If the Schedule is exhausted, it will invoke orElse with the last exception and the output of the Schedule to produce a fallback value of A. Returns Either with the fallback value if the Schedule is exhausted, or the successful result of action.
The Saga builder which exposes the SagaScope.bind. The saga
builder uses the suspension system to run actions, and automatically register their compensating actions.