Skip to main content

DEFAULT_IDEMPOTENCY_KEY_MAX_AGE

Constant DEFAULT_IDEMPOTENCY_KEY_MAX_AGE 

Source
pub const DEFAULT_IDEMPOTENCY_KEY_MAX_AGE: Duration;
Expand description

How long an idempotency key is kept when nothing else is asked for.

One day. The number has to exceed the longest window in which a client might still retry a send and expect a replay rather than a second execution, and clients retry in seconds — RetryPolicy’s own schedule is bounded in the low tens of seconds. A day is the figure the wider industry settled on for the same trade, and it is far enough above any retry budget this SDK ships that the choice is not delicate.

See RetentionPolicy::idempotency_key_max_age for what expiring a key costs.