Retries & idempotency
Respond with any 2xx status to acknowledge an event. If delivery fails โ a connection error, a timeout, or a non-2xx response โ Framme retries up to 10 times with exponential backoff.
Make handling idempotent
Retries reuse the same envelope id, so the same event can arrive more than once. Deduplicate on that id and make processing safe to repeat.
async function handle(event) {
// The envelope id is stable across retries โ use it as the dedupe key.
const firstTime = await markProcessed(event.id) // false if already seen
if (!firstTime) return // already handled; ack again
await applyOrderUpdate(event)
}Acknowledge quickly (return 2xx as soon as you've stored the event), then do slow work asynchronously โ a slow handler looks like a failure and triggers retries.