SShortSingh.
Back to feed

Retry Strategy for Failed Email Delivery Using Delayed Queues and Dead-Letter Handling

0
·3 views

A developer guide argues that the most effective approach to retrying failed email delivery in a Node.js background job system is a queue with delayed retries combined with a dead-letter queue. The recommended design acknowledges a job only after the email provider accepts it, moves permanently failing messages aside for inspection, and makes the sender idempotent because standard queues deliver at least once. For monitoring, the article suggests alerting on the age of the oldest unacknowledged job, the failed-delivery rate, and retry concentration rather than raw queue depth, which can rise during healthy traffic peaks. It also recommends setting service-level objectives around report delivery deadlines instead of promising exactly-once delivery, and draining workers deliberately during shutdown.

Read the full story at DEV Community

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

Related stories

0
ProgrammingDEV Community ·

Why Rewriting a JSON File in Place Can Leave Readers With Broken Data

A developer's page-building script repeatedly failed with JSONDecodeError because it read a JSON index while another script was rewriting it. Testing on Linux with Python 3.10.12 showed that open(path, 'w') truncates the file before new data is written, so readers often saw empty or partial content. Killing the writer mid-write also left a corrupted fragment with no intact version to fall back on. Writing to a temporary file and then swapping it in with os.replace eliminated the broken reads in the same test. The author notes three related pitfalls to watch for: a temp folder on a different filesystem, file permissions, and symlinks.

0
ProgrammingDEV Community ·

Unpinned CI actions and runaway concurrency prompted a zoned pipeline redesign

A team's CI pipeline suffered two costly failures in one quarter: a mutable action tag that was silently changed to push commits, and a concurrency misconfiguration that queued over 1,100 jobs and exhausted weeks of runner quota. To address these, they split the pipeline into an untrusted pull request zone with read-only permissions, no secrets, and aggressive cancellation, and a trusted publish zone limited to main that inherits secrets and never cancels mid-flight. Third-party actions are now pinned to commit SHAs with version comments for readability. The redesign also included disabling persisted checkout credentials and keying the browser cache on the lockfile, plus an agent smoke test to catch session-handoff failures that unit tests miss.

0
ProgrammingDEV Community ·

agent-doctrine: Open-Source Prompts for Getting AI Agents to Ship Tested Code

The sisig.ai team has open-sourced agent-doctrine, a set of prompts, role definitions and skills meant to make AI coding agents produce tested, mergeable pull requests. Every agent follows the same pipeline of scouting, gating, planning, implementing, reviewing, consolidating, verifying and shipping. Before any edit, the lead agent must answer fifteen questions from a TENETS.md file with evidence, such as the smallest correct change and the blast radius. Users choose a fast mode, which keeps the gate and per-diff review, or a rigorous mode, which adds plan simplification, adversarial review and approval before code. The project is MIT-licensed, requires Git and Bun, and rewrites global agent instructions, so users are advised to back up their configuration first.

0
ProgrammingDEV Community ·

Claude 3.5 Sonnet, GPT-4o-mini, or Gemini 1.5 Pro: Testing Chatbots for E-Commerce Support

A developer guide argues that the best chatbot API for e-commerce support should be chosen by testing with real support tickets rather than relying on generic leaderboards. It recommends Claude 3.5 Sonnet for the most natural conversational quality, GPT-4o-mini for faster, budget-friendly deployments, and suggests testing Gemini 1.5 Pro before deciding. The author proposes scoring label accuracy, escalation decisions, required output format, and tone separately, and running each test more than once to avoid relying on single responses. The article also advises designing the API boundary so the chosen model can be swapped without rewriting the triage workflow.