Node.js Reminder Scheduling: Separating Cron Selection from Queue Delivery
Renewal reminders involve two distinct problems: locating accounts at the correct business deadline and delivering notifications reliably through unreliable channels. The article recommends using cron to select due reminders and an at-least-once queue for delivery, with a single delayed job suited to deadlines within seven days and a periodic selector for longer horizons. A central principle is ensuring that one logical reminder results in at most one externally visible send, even when delivery is retried. It advises keeping deadlines in durable application data, avoiding large batches within a single cron run, and recognizing that a successful queue publish does not confirm customer receipt. The authors also stress making workers idempotent, using deterministic reminder keys and transactional claims to prevent duplicate sends.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in