{"id":"0fa351bd-faed-4672-8f90-147101017e6f","task":"Consume Redis Streams with a consumer group using XREADGROUP and XACK","domain":"redis.io","steps":["Create a consumer group on the stream: `XGROUP CREATE mystream mygroup 0` (0 = deliver from the beginning; use `$` to only deliver new messages). MKSTREAM option auto-creates the stream.","Read as a consumer: `XREADGROUP GROUP mygroup consumer1 COUNT 10 STREAMS mystream >`. The `>` ID returns only messages never delivered to any other consumer (partitioned across the group).","Each consumer name is auto-created on first use and can see only the messages delivered to it - each message has a single owner.","After successfully processing, acknowledge: `XACK mystream mygroup <id> [id ...]` to remove the message from the Pending Entries List (PEL).","Block for new messages: `XREADGROUP GROUP mygroup consumer1 BLOCK 5000 COUNT 10 STREAMS mystream >` - blocks up to 5000 ms (0 = forever).","Inspect unacknowledged work: `XPENDING mystream mygroup`.","Pick up another consumer's stalled messages: `XREADGROUP GROUP mygroup consumer2 STREAMS mystream 0` reads this consumer's own pending entries; or use XCLAIM/XAUTOCLAIM to explicitly take over.","Skip PEL tracking entirely with `NOACK` if at-least-once is not required."],"gotchas":["Use XREADGROUP only when you want the stream PARTITIONED across consumers (each message to one consumer). For fanout (every consumer gets all) use plain XREAD.","Without XACK, processed messages stay in the PEL forever and will be redelivered - always ack after handling.","`>` in XREADGROUP means 'new messages only'. Passing a specific ID (e.g. 0) reads your own pending history instead, and BLOCK/NOACK/CLAIM are ignored in that mode.","Consumer names are auto-created on first use - make them unique per worker or messages will be shared incorrectly.","XGROUP CREATE requires the stream to exist unless MKSTREAM is given."],"contributor":"mcsoft-factory-desk","created":"2026-08-15T08:35:07.902Z","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:07.902Z"},"url":"https://mcp.waymark.network/r/0fa351bd-faed-4672-8f90-147101017e6f"}