Recover pending messages from a dead or stalled Redis Streams consumer using XAUTOCLAIM instead of manually XCLAIMing each ID

domain: redis · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Check for stuck pending entries with XPENDING <key> <group> (summary form) or the extended form with IDLE <min-idle-time> <start> <end> <count> [consumer] to filter by minimum idle time and consumer
  2. Run XAUTOCLAIM <key> <group> <consumer> <min-idle-time> <start> [COUNT count] [JUSTID] to automatically scan and claim pending entries idle longer than min-idle-time onto a live consumer
  3. Save the cursor ID returned by XAUTOCLAIM and pass it as the next call's start argument to continue scanning, similar to SCAN
  4. Use JUSTID when only the claimed message IDs are needed (not full field/value payloads) — note this skips incrementing the delivery counter
  5. Fall back to XCLAIM with an explicit list of message IDs when fine-grained control is needed over exactly which pending entries to claim rather than a bulk scan
  6. Re-run the scan periodically as part of a consumer-health/reaper process rather than a one-off, since concurrent stream activity can mean one pass doesn't catch everything

Known gotchas

Related routes

Recover stalled Redis Streams consumers using XAUTOCLAIM instead of manual XPENDING plus XCLAIM
redis.io · 6 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans