(feat) Adds client support for the XNACK command#3790
Open
elena-kolevska wants to merge 3 commits intoredis:masterfrom
Open
(feat) Adds client support for the XNACK command#3790elena-kolevska wants to merge 3 commits intoredis:masterfrom
elena-kolevska wants to merge 3 commits intoredis:masterfrom
Conversation
36fa525 to
8b98eab
Compare
ndyakov
approved these changes
Apr 30, 2026
Member
ndyakov
left a comment
There was a problem hiding this comment.
Left no blocking suggestions that we can discuss before merging. Let's align with the rest of the clients.
| fmt.Println(res31a) // >>> 0-0 | ||
| // STEP_END | ||
|
|
||
| // STEP_START xnack |
Member
There was a problem hiding this comment.
We should contact the docs team to include this example
| // - "FATAL": the message is invalid or suspected malicious. The delivery | ||
| // counter is set to MAXINT, which will immediately move the message to | ||
| // the Dead Letter Queue (DLQ) if one is configured for the group. | ||
| Mode string |
Member
There was a problem hiding this comment.
Should we define this as iota or just have the accepted values as constants?
| // RetryCount sets the delivery counter to an explicit value, overriding the | ||
| // counter adjustment that would otherwise be applied by Mode. | ||
| // Leave nil to let Mode control the counter (the common case). | ||
| RetryCount *uint64 |
Member
There was a problem hiding this comment.
Although I am not keen to have this as a pointer maybe it is the only logical solution to distinguish between empty value and zero.
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.
Adds client support for the XNACK command introduced in Redis 8.8 (redis/redis#14797).
XNACK negatively acknowledges one or more messages in a consumer group's Pending Entries List (PEL), releasing them back to the group for redelivery without removing them from the PEL. This gives consumers finer-grained control over failure semantics compared to simply leaving a message unacknowledged.
Note
Low Risk
Mostly additive stream-command plumbing plus new tests/doctest updates; low risk aside from potential argument formatting/Redis version gating issues.
Overview
Adds Redis 8.8+ support for the
XNACKconsumer-group command via a newXNackArgsstruct andClient.XNackmethod, and exposes it onStreamCmdable.Extends the stream command test suite to cover required
Mode, theSILENT/FAIL/FATALbehaviors (includingRetryCount,Force, andnacked-countvisibility), and updates the stream tutorial doctest with anXNackexample and renumbered variables.Reviewed by Cursor Bugbot for commit 26b1e89. Bugbot is set up for automated code reviews on this repo. Configure here.