StaticisThe default judgement on whether a failure is transient.
The thrown value.
true when another attempt is reasonable.
An abort or a timeout is not retryable: the caller's own timeout already spent the budget it allowed.
An Error with a numeric status is read as an HTTP failure, and retried
only for 429 and the 5xx gateway family.
Anything else is treated as a network failure and retried, which is the safe
reading — fetch rejects for DNS, TLS and connection resets, and all three
are worth a second look.
StaticrunRuns an operation, retrying failures judged transient.
The operation's result.
The work to attempt. Must be safe to run more than once.
Overrides for the resolved delivery defaults.
Whatever the operation returned.
Backoff doubles: with the shipped defaults that is one attempt, 250 ms, a second, 500 ms, a third. The last failure is rethrown unchanged, so the caller sees the real cause rather than a wrapper.
ConfigurationError When delivery is not registered and
either attempts or backoffMs was left to default.
Retries an operation with a bounded attempt count and exponential backoff.
Remarks
Reads
delivery.retriesanddelivery.retryBackoffMsinside each call, after application configuration. Callers can override either setting in RetryOptions.The default policy identifies HTTP failures by an Error's numeric
statusfield. SupplyisRetryablefor application-specific failures.Operations must be safe to repeat. Callers are responsible for idempotent writes.
Example
Author
Bayu Dwiyan Satria
Version
1.3.1
Since
1.3.1