Skip to content

[NEW] XNACK - Release an entry back to the Pending Entries List (PEL)Β #4561

Open

Description

@mazen-isstech

The problem/use-case that the feature addresses

When a consumer knows it will not be able to process an entry in a stream (due to failure, timeout or graceful consumer shutdown), there is no way to put the entry back into the Pending Entries List (PEL). As far as I can tell, the only current idiomatic solution is to use min-idle-time in XCLAIM/XAUTOCLAIM to only re-claim entries that have been idle for more than min-idle-time. This causes a needless delay for entry re-processing. It's needless because the consumer that owns the entry already knows it will not process it, and time can be saved by letting that consumer courteously put it back into the PEL.

Description of the feature

The XNACK command releases an entry back to the Pending Entries List (PEL) from a consumer, allowing another consumer to immediately pick it up for re-processing.

Alternatives you've considered

  • One could completely delete the entry and add an identical one in a transaction. That's technically possible, but it adds an overhead, and makes streams slower in situations where you have a lot of entries failing. Another issue is that it's unclear how one would preserve the entry retry-counter.
  • Probably the best alternative: using XCLAIM to set the idle value to something large, allowing other consumers to claim it. This would however make the entry look idle, it may or may not be an issue depending on how the consumer is designed.

Additional information

Redis documentation of XNACK: https://redis.io/docs/latest/commands/xnack/

Activity

  1. added
    enhancement
    on Aug 30, 2026
  2. zuiderkwast commented on Sep 14, 2026

    @zuiderkwast
    Contributor

    We talked about it in the core team meeting (@valkey-io/core-team) and we're positive.

    If it's implemented and reviewed within the next few weeks, we can probably include it in Valkey 9.2.

  3. hpatro commented on Sep 15, 2026

    @hpatro
    Contributor

    Hello @nickiaq,

    Would you be interested in implementing this?

  4. nickiaq commented on Sep 15, 2026

    @nickiaq
    Contributor

    Absolutely, I'm interested.

    I was checking this out yesterday actually and have the core flow setup with modes [SILENT | FAIL | FATAL] and tests. I have to still add support the trailing options [RETRYCOUNT count] [FORCE] and add tests for edge cases.

    One big question I still have to look into is what happens around replication. For XACKDEL & XDELEX it was possible to achieve the same effect on pre-9.2 replicas by only replicating XACK and XDEL instead of the new commands. But, I haven't had a chance yet to look into how that might be possible here.

    I'll put up a PR later this week.

  5. zuiderkwast commented on Sep 15, 2026

    @zuiderkwast
    Contributor

    Replicate XNACK as XNACK. I suppose there is no other way.

    The contract is that if the user wants to add old version replicas (to do a rolling downgrade after a rolling upgrade), they can't use any of the new commands that some replicas can't handle. It's not supported; if they do that, we don't guarantee that it will work.

  6. added this to Valkey 10.0 and removed this from Valkey 9.2on Oct 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementmajor-decision-approved

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions