feat(messagequeue)!: drop the requeue delay parameter from Nack - #491
Draft
behinddwalls wants to merge 1 commit into
Draft
feat(messagequeue)!: drop the requeue delay parameter from Nack#491behinddwalls wants to merge 1 commit into
behinddwalls wants to merge 1 commit into
Conversation
## Summary
### Why?
Nack's delay parameter was vestigial. The consumer framework — the only production caller — always passed 0 and let the visibility timeout space retries, and the delay's other conceivable use ("check back later" pacing) is exactly what Postpone now expresses with correct retry accounting. Keeping the parameter left two overlapping delay knobs on the delivery contract and invited nack-as-backoff, which burns the DLQ budget.
### What?
Delivery.Nack becomes Nack(ctx): the message is immediately eligible for redelivery, retries are spaced by the visibility timeout, and the redelivery counts toward the failure budget as before. MarkNacked drops its delay accordingly (invisible_until = now). Integration tests: TestNackWithDelay is deleted (the delay was the feature; redelivery-after-lapse is already covered by TestVisibilityTimeoutAndRetry); TestNackDoesNotBlockOtherMessages becomes TestInFlightMessageDoesNotBlockOtherMessages, proving the skip property with an un-finalized in-flight head instead of a 30s nack (arrange-first, mirroring the postpone barrier test it contrasts with); other call sites are mechanical. Docs updated (READMEs, sql-queue RFC nack semantics).
## Test Plan
✅ `make test` (83 targets). ✅ `bazel test //test/integration/extension/messagequeue/...` — DLQ at MaxAttempts via immediate nacks, non-blocking in-flight head, multi-consumer-group independence. ✅ `make fmt`, `make mocks`.
This was referenced Aug 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Why?
Nack's delay parameter was vestigial. The consumer framework — the only production caller — always passed 0 and let the visibility timeout space retries, and the delay's other conceivable use ("check back later" pacing) is exactly what Postpone now expresses with correct retry accounting. Keeping the parameter left two overlapping delay knobs on the delivery contract and invited nack-as-backoff, which burns the DLQ budget.
What?
Delivery.Nack becomes Nack(ctx): the message is immediately eligible for redelivery, retries are spaced by the visibility timeout, and the redelivery counts toward the failure budget as before. MarkNacked drops its delay accordingly (invisible_until = now). Integration tests: TestNackWithDelay is deleted (the delay was the feature; redelivery-after-lapse is already covered by TestVisibilityTimeoutAndRetry); TestNackDoesNotBlockOtherMessages becomes TestInFlightMessageDoesNotBlockOtherMessages, proving the skip property with an un-finalized in-flight head instead of a 30s nack (arrange-first, mirroring the postpone barrier test it contrasts with); other call sites are mechanical. Docs updated (READMEs, sql-queue RFC nack semantics).
Test Plan
✅
make test(83 targets). ✅bazel test //test/integration/extension/messagequeue/...— DLQ at MaxAttempts via immediate nacks, non-blocking in-flight head, multi-consumer-group independence. ✅make fmt,make mocks.Stack