Skip to content

Retries & idempotency

Reliable delivery means messages are retried until they land — which means the same message can arrive more than once. Idempotency is how both sides stay correct anyway.

When 2mee delivers an event to your endpoint:

  • Success is any 2xx. 2mee stops retrying.
  • Retryable failures — 5xx, timeouts, connection errors — are retried with exponential backoff and jitter over a window of 1–3 days.
  • 429 is respected: 2mee waits at least your Retry-After before the next attempt.
  • After the window is exhausted, the delivery is dead-lettered and an alert is raised. The endpoint may be auto-paused after sustained failure. You (and we) can replay from the delivery log once the cause is fixed.

Every attempt is recorded in the delivery log — endpoint, event id, status code, latency and error.

Because a delivery can repeat, key your processing on the envelope id:

  1. On receipt, check whether you’ve already processed this id.
  2. If yes, return 2xx and do nothing else.
  3. If no, record the id, do the work, return 2xx.

Store seen ids for at least the retry window (a few days).

When you call the ingest API, send a stable messageId that doesn’t change across your retries:

  • 2mee dedupes on it. A duplicate is acknowledged (409) without re-running the flow.
  • An entry tag (webhook-{messageId}) is recorded on the visitor, so re-delivering the same message can’t restart someone’s flow.
  • Events older than the 5-minute timestamp window are rejected as replays.

Inside a flow, each action is guarded by a “has not done before” completion tag. Re-evaluating the graph, or a duplicate queued delivery, can’t make the same step fire twice for the same person. You don’t manage these tags — they’re how the engine stays exactly-once. See tags & attributes.

ConcernInbound (you → 2mee)Outbound (2mee → you)
Idempotency keymessageId (you send)id (you read)
Dedupe owner2meeYou
Replay window5 min (timestamp)1–3 days (retry)
On exhaustionRejectedDead-lettered + alert + replay
Was this page helpful? Tell us / report an issue ↗