Skip to content

Use all of FIFO's twelve hours

SQS will not keep a message hidden past twelve hours from the receive that took it. For both varieties the adapter cuts a longer decline delay to what is left of the twelve hours, and ends a lease that has none left. Measured on 2026-10-12, a FIFO queue accepted a visibility of twelve hours from the call at any point in a receive, where a Standard queue refused anything past twelve hours from the receive (the measurement).

MaxHeadroom is the opt-in to that, FIFO only:

backend := sqs.FIFO(settings, sqs.MaxHeadroom())

Under it:

  • a decline waits its whole delay, up to the capability's MaxRedeliveryDelay of twelve hours;
  • a lease extends by its full AckWait on every heartbeat;
  • MaxProcessingTime may exceed twelve hours. Without it, a MaxProcessingTime above twelve hours is refused at Subscribe.

AWS documents the cap for both varieties, so this is opt-in. If SQS refuses a call as past the cap, the adapter retries at what is left of twelve hours from the receive, which is what it does without the option. A decline cut that way counts in DelayShortened, and a lease with nothing left ends and counts in LeaseExpired.

Standard has no such option. See Settlement, visibility and redrive for the arithmetic.