Urgent.News

What's breaking now, across thousands of outlets.

Tech

Implementing 2026 Seller Compliance Practices for Retrying Failed Email API Calls

TL;DR: Retry a failed email API call only when the response is plausibly transient, use capped exponential backoff with jitter, and write an immutable attempt record before each sleep. For a B2B marketplace order, the useful artifact is not merely sent=true ; it is a chain showing which order was notified, which policy decision was made, what the transport returned, and when the next attempt…

Retrying a failed email API call should only occur when the response is likely temporary. Implement a capping mechanism for exponential backoff with added randomness (jitter). Before each delay, write an unchangeable record of the attempt. For B2B marketplace orders, the relevant data includes the order ID, notification ID, recipient's address (or a privacy-preserving substitute), policy version, attempt number, decision outcome, response class, and time stamps in UTC.

Save the provider's response body only under a data retention policy that scrutinizes personal information. An effective record should differentiate between accepted, rescheduled, permanent failure, and cancelled statuses. It must keep the idempotency key used for the request, which alone doesn't make the remote API idempotent, but it provides a reference point for compatibility and investigation.

Distinguish between the HTTP API accepting a submission and subsequent mail processing producing a bounce or delivery event. Understand that SPF is a host authorization mechanism, not confirmation of mailbox acceptance. Keep the distinction between API acceptance and downstream delivery or bounce evidence clear.

When deciding on retry strategies, focus on the response class rather than the number of attempts. A 429 "Too Many Requests" response signals rate issues; follow any Retry-After header if it's both parseable and within an operational limit. A 5xx response typically indicates a server-side problem, but the remote contract dictates the course of action.

Network-level issues like timeouts or connection resets are harder to determine - retry such cases with an idempotent approach and a limited number of attempts. Do not retry a 400 for invalid payload data, a 401 or 403 for authentication or policy issues, or a confirmed permanent recipient rejection. A retry loop can exacerbate the problem by generating duplicate messages, confusing the true cause of failure, and complicating compliance evidence.

Limit the retry loop to the boundary of what is necessary. For attempt n, use a schedule of base * 2^n, but cap it at a maximum and add jitter to the delay to prevent a synchronized wave of retries that could overwhelm the API quota. Base and cap values should be determined through capacity planning, considering worst-case retry volume against API quotas, queue depth, worker concurrency, and the notification service's Service Level Objective (SLO).

Starting points for base and cap might include a 30-second request deadline and a 15-minute retry limit, but these need to be measured against real-world queue ages and dependency behaviors before being set in stone. The queue's growth rate is often underestimated. With 500 workers each handling a retryable job, and the dependency returning a 429 for two minutes, if every worker starts retrying at the same instant, the second batch of retries could inadvertently replicate the rate-limiting effect.

Applying full jitter turns this synchronized wave into a distribution, while a cap prevents any single worker from monopolizing the retry capacity indefinitely. In addition to the initial send, the operational record should track every eligible retry, the number of workers capable of handling retries during the same interval, the API quota's refill behavior, and the delay added by any database leases.

The operational record should document the selected delay, the cap, and the policy version so that auditors can verify the decision-making process without relying on assumptions about the worker's state at the time.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Line-anchored output and the filter chips

JSLab feature notes: one docs page, explained. Today: The output panel . JSLab is a JavaScript & TypeScript scratchpad for macOS. You type, it runs, and the output panel fills up.

  • JSLab is a macOS development environment for JavaScript and TypeScript.
  • Output rows display line of code and corresponding results, logs, or errors.
  • Four filter chips categorize output entries and show live counts.

Custom fields on the WooCommerce Checkout block: why your old snippet does nothing

If you added a checkout field with woocommerce_checkout_fields or printed one on woocommerce_after_order_notes , and it's simply not there on a newer store, the store is probably using the Checkout…

  • WooCommerce Checkout block introduced in 8.3
  • woocommercecheckoutfields only partially supported
  • Additional Checkout Fields API introduced in 8.9

Java Virtual Threads vs Kotlin Coroutines: Suspension Models and the Shifting Bottleneck

The usage and internals of Java virtual threads and Kotlin coroutines are already widely covered. Rather than explaining each technology separately, this post compares how their different ways of…

  • Java virtual threads save stack for suspension, OS threads resume
  • Kotlin coroutines save local variables and label in Continuation object
  • Both shift resource bottleneck to less visible location

WireGuard on your own or Tailscale in a homelab: what control plane do you want to operate

In short: The short answer is that Tailscale is WireGuard with the coordination work done by someone else. The real question is not which one encrypts better, but which part of the control plane do…

  • Tailscale simplifies control with automatic network and NAT handling
  • WireGuard requires manual configuration and maintenance
  • Tailscale Personal plan is free for non-commercial use

More from Monday 2 November →