Making Node.js background job workers safe for healthtech cleanup with idempotent retries
The article argues that a scheduled cron trigger should only start cleanup work, while a durable queue carries the actual request. Because queues usually deliver at least once, a worker can crash after performing a deletion but before acknowledging the message, so the system must tolerate duplicates. The author recommends a failure drill that kills a worker mid-run and redelivers the message to confirm that no second business decision occurs. Eligibility should come from a repeatable policy decision, with malformed or unknown-policy items routed to a dead-letter queue. Acknowledgement should happen only after the idempotent effect and its outcome are recorded, and retries should use bounded or delayed handling.
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