Skip to content

feat(sqs): add delivery mode for at-least-once and at-most-once reads - #124

Merged
Divyanshu Tiwari (divyanshu-tiwari) merged 3 commits into
mainfrom
feat/sqs-delivery-mode
Sep 15, 2026
Merged

Divyanshu Tiwari (divyanshu-tiwari) merged 3 commits into
mainfrom
feat/sqs-delivery-mode

Conversation

@divyanshu-tiwari

Copy link
Copy Markdown
Contributor

Summary

  • Adds an SQS-only delivery field: at-least-once (default, current deferred-ack behavior) or at-most-once (delete on receive so FIFO groups are not blocked by downstream work).
  • exactly-once is reserved and rejected at Init; SQS cannot consume exactly-once.
  • Existing pipelines keep at-least-once unless they opt into delivery: at-most-once.

Test plan

  • Confirm an existing SQS reader with no delivery field still defers DeleteMessage until downstream finishes.
  • Set delivery: at-most-once on a FIFO reader and confirm receipts are deleted immediately and later messages in the group can be received while downstream is still running.
  • Confirm delivery: exactly-once and unknown values fail at startup.
  • Confirm write-mode SQS is unchanged.

Default stays at-least-once so existing pipelines keep deferred ack. Opt into at-most-once to delete on receive when FIFO group throughput matters.
… mode

Tests that needed the interface are throwaway. Unknown delivery values fail in Init; empty defaults to at-least-once in the same switch.
Restore concurrent DeleteMessage for at-most-once by settling an ack immediately
and handing it to the existing tracker, so concurrency still bounds in-flight
deletes and the receive loop is not blocked on each RTT.
@divyanshu-tiwari
Divyanshu Tiwari (divyanshu-tiwari) merged commit ba50faf into main Sep 15, 2026
7 checks passed
@divyanshu-tiwari
Divyanshu Tiwari (divyanshu-tiwari) deleted the feat/sqs-delivery-mode branch September 15, 2026 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants