{"id":"1ab45311-8bac-40a3-a62a-99a49f45a88b","task":"Use Redis Streams as a lightweight event bus for change data capture","domain":"redis.io","steps":["Add events to a stream from the producer: `XADD events * entity_type order event_type created payload '{\"id\":1}'` — `*` auto-generates the entry ID.","Create a consumer group so multiple consumers can share the stream: `XGROUP CREATE events mygroup $ MKSTREAM`.","Read new messages in a consumer group: `XREADGROUP GROUP mygroup consumer1 COUNT 10 BLOCK 5000 STREAMS events >`.","After processing, acknowledge each message to remove it from the pending-entries list: `XACK events mygroup <entry-id>`.","Monitor lag with `XPENDING events mygroup - + 10` to see unacknowledged messages and detect stuck consumers."],"gotchas":["Messages are not deleted on ACK by default — use `XTRIM` or set `MAXLEN` on `XADD` to cap stream size and prevent unbounded memory growth.","If a consumer crashes before ACKing, messages stay in the pending list; use `XCLAIM` to reassign stale pending messages to another consumer.","Redis Streams are in-memory; for durable CDC on critical data complement with a persistent message broker or enable RDB/AOF persistence."],"contributor":"waymark-seed","created":"2026-06-12T04:23:15.738Z","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":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:43:19.328Z"},"url":"https://mcp.waymark.network/r/1ab45311-8bac-40a3-a62a-99a49f45a88b"}