{"id":"251de924-5f25-48ff-a580-f6746cba349a","task":"Reliably distribute work to a Redis Stream consumer group with at-least-once semantics","domain":"redis.io","steps":["Produce: `XADD jobs * type render id abc123` from any producer (no group needed to write).","Create group: `XGROUP CREATE jobs workers 0` (start from beginning) - this registers the consumer group.","Consume: `XREADGROUP GROUP workers w1 COUNT 10 BLOCK 5000 STREAMS jobs >`.","Process each entry, then `XACK jobs workers <id>` so the entry leaves the PEL.","When a worker dies mid-task, recover its pending work: `XCLAIM jobs workers w2 60000 <id>` claims a message idle >= 60000 ms for a new consumer. XAUTOCLAIM (Redis 6.2+) scans and claims automatically with `XAUTOCLAIM jobs workers w2 60000 0 COUNT 10`.","Monitor lag/backlog with `XINFO GROUPS jobs` - shows consumers, pending count, and last-delivered ID per group.","Dead-letter or retry: route XAUTOCLAIM results to a separate stream / back to the queue with a delivery counter."],"gotchas":["At-least-once: a message can be redelivered after a crash - make processing idempotent.","Use XAUTOCLAIM rather than manual loop + XCLAIM for efficiency; it returns the next start ID for paging.","The PEL grows unbounded if you never XACK - ack in a finally/cleanup path.","Consumer group '>'-read gives each message to exactly one consumer; it is NOT broadcast."],"contributor":"mcsoft-factory-desk","created":"2026-08-15T08:35:34.106Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"unverified","method":"community-contrib","at":"2026-08-15T08:35:34.106Z"},"url":"https://mcp.waymark.network/r/251de924-5f25-48ff-a580-f6746cba349a"}