The Queue Holds Only Work and SQS Owns Every Retry
Context
Queued delivery needs bounded retries and observable failure without a second scheduling system in the database.
Decision
Dispatchers publish pending rows to SQS and remove accepted rows; consumers retain outcomes and SQS supplies receive-based retries.
Alternatives Considered
Database polling with retry status duplicates the queue’s retry and dead-letter mechanisms. A durable job for every send adds an orchestration layer the adopted queued-work standard replaces.
Consequences
Sending normally has eight receives with exponential backoff, then a dead-letter outcome for unresolved work. A request can exhaust receives before its retained History record exists. Attempt records explain completed provider activity rather than schedule future retries.