Skip to content

How would you add event reminders without missing or duplicating sends?

1 min read · main part only; folded sections are optional

After this you can answer: How would you add event reminders without missing or duplicating sends?

Start with product rules: how far before the event, which timezone determines the schedule, whether reschedules create a new reminder and when a late reminder should be discarded. Store an unambiguous due instant and preserve the event timezone for display and schedule interpretation.

A proposed reminder table would record booking, schedule version, due time and delivery state. A dispatcher would claim due rows in bounded batches and publish through a durable outbox. Queue delivery can repeat, so the consumer key should include the reminder type and schedule version, not only the booking ID.

A fresh status check before sending reduces canceled-booking messages but cannot atomically coordinate a cancellation with an external email send. State that race and agree on acceptable behavior. Measure dispatch lag, provider failures and expired unsent reminders separately. None of the reminder table, dispatcher or reminder message schema exists in this codebase; the code reference below is the current reusable pattern.

Why not keep a timer inside each API process?
Process replacement loses timers and multiple replicas can schedule duplicates. Durable due work survives both.
What happens after an hour-long outage?
Dispatch overdue reminders according to the agreed late-send policy and cap recovery throughput so the provider is not overwhelmed.
Would an external scheduler remove idempotency needs?
No. A reliable trigger still needs duplicate-safe processing and a durable record of the intended business action.

Read the path chapter, select the relevant map piece →, then inspect apps/api/src/queries/outbox.ts → deliverBatch.

Read this book online: https://book.theversehub.in/