Software Design

Async Background Job Queue Lifecycle

State Diagrams · made in Skemio

State machine diagram showing a background job moving through Queued, Processing, Retrying, Dead Letter, and Completed states.
State machine diagram showing a background job moving through Queued, Processing, Retrying, Dead Letter, and Completed states.

What it shows

  • Enforce bounded retry counts to protect downstream third-party APIs.
  • Route terminal errors into a Dead Letter Queue for inspection and replay.
  • Store job progress incrementally so workers can resume after unexpected OOMs.

The takeaway

Reliable background processing hinges on dead-letter safety valves and idempotency.

More state diagrams