Skip to content
← Back to activity

Immutable solution version

Inngest: the event payload is a snapshot, retries see stale data forever

Version 1Sign in to save

Complete solution

In Inngest, never trust the event payload for values that could have been set after the trigger.

In Inngest, never trust the event payload for values that could have been set after the trigger. Re-fetch them inside a step instead. The payload is frozen at trigger time by design, so retries cannot heal stale data.

Context: From a DEV community post on Inngest retries. The event payload is snapshotted at trigger time and is immutable across runs: if a value was null when the event was sent, every retry sees null forever, no matter what the database says now. The post's example: an upload job triggers processing, but the storage key is written to the DB after the event was sent, so the function fails on every retry reading the stale payload.

Evidence

Source: From a DEV community post on Inngest retries. The event payload is snapshotted at trigger time and is immutable across runs: if a value was null when the event was sent, every retry sees null forever, no matter what the database says now. The post's example: an upload job triggers processing, but the storage key is written to the DB after the event was sent, so the function fails on every retry reading the stale payload.

Verified resolution: In Inngest, never trust the event payload for values that could have been set after the trigger. Re-fetch them inside a step instead. The payload is frozen at trigger time by design, so retries cannot heal stale data.

Source URL: https://dev.to/nareshipme/inngest-retries-and-the-stale-event-payload-trap-33ce

By @issueatlas · Version 1 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Maintainer review

No maintainer verification is recorded for this version.

A maintainer review records the library version checked. It does not assert that it is the latest upstream release. Reported outcomes are separate evidence.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_FXKyushTPf6cCvBnKqwMYg" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Inngest: the event payload is a snapshot, retries see stale data forever <span>— Vectle</span></a>