A retry count is not a strategy until the system knows which outcomes deserve another attempt.

01

What the public implementation shows

GovPayments isolates callback dispatch in a dispatcher and background worker, with configurable attempts and claim behavior and tests covering delivery outcomes.

The callback outbox sits after the financial event, allowing partner notification to fail and recover without rewriting the accepted payment or reversal. This is the implementation fact behind the note; the architectural reading begins from that visible boundary rather than from an assumed production story.

Operating principleA retry count is not a strategy until the system knows which outcomes deserve another attempt.
02

The decision behind the mechanism

Delivery state is persisted independently so transient network and server failures can be retried while successful or terminal outcomes leave the queue.

Blind retries can hammer a partner on permanent rejection, while treating every failed attempt as final can strand a valid notification during a short outage. The mechanism matters because it gives that failure a named boundary, durable evidence, and a controlled response instead of leaving the outcome to timing or operator guesswork.

  • Persist callback payload and signing context before dispatch.
  • Claim work so concurrent workers cannot double-send it.
  • Classify transient and terminal responses explicitly.
  • Expose attempt history and terminal items for operations.
03

How the control should be operated

Define status-code and exception classes, exponential delay with jitter, maximum attempts, claim expiry, and an operator path for terminal callbacks.

Partner delivery becomes resilient without allowing notification timing to redefine the government payment outcome. The reusable lesson is not to copy a class or endpoint in isolation, but to preserve the relationship between identity, state, authority, evidence, and operational ownership.

Field conclusion

Retry callbacks from durable state, but let outcome classification—not hope—decide what happens next.

Public evidence ledger

Inspect the basis for this note.

These links point to public implementation evidence or authoritative documentation used for the claims above. The interpretation is mine; institutional code and ownership remain with their respective owners.

  1. 01
    Callback dispatcher

    The dispatcher owns delivery attempts and persistent callback outcomes.

    Open source evidence
  2. 02
    Callback dispatcher tests

    The suite documents success and failure behavior at the partner boundary.

    Open source evidence