---
id: ADR-COM-FUL-005
title: Use queue attempts to govern known retries and retain exhaustion
product_area: commerce
module: fulfillment
revision: 1
status: proposed
design_intent: proposed
source_sha:
  services-commerce: c8b66a98e2490617aec38ba5c8165dd9bd0a8f9b
decision: >-
  Use queue receive counts for known transient failures and record exhaustion;
  use one redispatch before abandoning an overdue acknowledgement.
constrains:
  - WF-COM-FUL-003
  - STATE-COM-FUL-001
  - SVC-COM-FUL-fulfillment
origin: >-
  services-commerce:docs/migrations/obligation-register/README.md#D-P4-07,
  #D-P4-08 (build decisions)
alternatives:
  - option: Use a separate consumer to close dead-lettered work.
    why_not: >-
      A separate dead-letter consumer needs its own redrive and acknowledgement
      policy.
  - option: Track retry attempts in database records and a schedule.
    why_not: A database retry budget would duplicate the queue receive budget.
consequences:
  - >-
    Known exhaustion becomes a delivery failure and finding; arbitrary throws
    can bypass it.
  - >-
    Redriven terminal delivery is stale, so recovery needs staff
    re-authorization.
  - >-
    Progress renews the acknowledgement deadline, with one redispatch before
    abandonment.
  - >-
    Physical units still waiting in a warehouse can fail under that same timing
    policy.
supersedes: []
evidence:
  - >-
    services-commerce at c8b66a98:
    modules/fulfillment/services/register/obligation-worker.ts,
    register-sweeper.ts; aws/resources/obligations-queue.sqs.ts.
---

# Use queue attempts to govern known retries and retain exhaustion

## Context

Unavailable applications and lost acknowledgement need a visible stopping condition.

## Decision

Use queue receive counts for known transient failures and record exhaustion; use one redispatch before abandoning an overdue acknowledgement.

## Alternatives Considered

Use a separate consumer to close dead-lettered work. A separate dead-letter consumer needs its own redrive and acknowledgement policy.

Track retry attempts in database records and a schedule. A database retry budget would duplicate the queue receive budget.

## Consequences

Known exhaustion becomes staff attention, while arbitrary throws may bypass that record. Physical warehouse delays are subject to the same acknowledgement rule.
