Skip to content

feat: Add Per-Key Ordering Guarantees - #15

Merged
ThomasHartDev merged 1 commit into
mainfrom
thomas/feat/message-ordering
Sep 4, 2026
Merged

feat: Add Per-Key Ordering Guarantees#15
ThomasHartDev merged 1 commit into
mainfrom
thomas/feat/message-ordering

Conversation

@ThomasHartDev

Copy link
Copy Markdown
Owner

WorkQueue round-robins messages independently, so two events for the same order can be in flight on different consumers and finish out of order. KeyedWorkQueue is the SQS FIFO / Kafka key model: at most one in-flight delivery per key, later messages of that key wait, and other keys can still run in parallel.

Nack puts the head back at the front of that key so a retry cannot be overtaken. Prefetch can hold several keys, never two messages of one key. The barrel also re-exports DeadLetterQueue so the existing tests typecheck against src/index.

Closes #14

KeyedWorkQueue keeps FIFO order within a message key and lets
different keys run in parallel on competing consumers.
@ThomasHartDev
ThomasHartDev force-pushed the thomas/feat/message-ordering branch from 0c7cb9d to fa9a77c Compare September 4, 2026 19:31
@ThomasHartDev
ThomasHartDev merged commit c39c34f into main Sep 4, 2026
@ThomasHartDev
ThomasHartDev deleted the thomas/feat/message-ordering branch September 4, 2026 19:31
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.

Per-key ordering on competing consumers

1 participant