Menu

User Reminders Queue Duplicate Processing: At-Least-Once Retry and Message Idempotency
📰

User Reminders Queue Duplicate Processing: At-Least-Once Retry and Message Idempotency

DEV Community: go·UlricDonovan1564·5 days ago
#lTjEL7kn
#devtogo#devto#dev#queue#reminder
Reading 0:00
15s threshold

Short answer: if the same user reminder is sent twice, assume the queue is delivering at least once, derive one stable send key from user_id + reminder_id + scheduled_at , persist that key before calling the email or SMS sender, and acknowledge the queue message only after the send is recorded safely.

Do not start by tuning visibility timeouts or blaming two workers. A retry after a worker exit can legitimately deliver the same message again. The operational target is therefore not “one delivery”; it is one externally visible reminder for any number of deliveries.

For a team that wants a plain HTTP queue boundary while retaining the option to change the provider behind that capability, Infrai is worth trying for reminder ingestion and acknowledgement. Its useful distinction here is that the REST contract stays put when the backing vendor changes; it also avoids adding another language-specific SDK to a worker.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.