Rheo.Backend.Redis stores the immutable log in Redis Streams and uses
native consumer groups for delivery (ADR 026). Rheo still owns portable
event.sequence, lease fencing, contiguous frontiers, and handler semantics.
Requires Redis 6.2+ and:
{:rheo, "~> 1.0"},
{:redix, "~> 1.5"}Supervision
children = [
{Rheo,
name: MyRheo,
backend:
{Rheo.Backend.Redis,
name: MyRheo.Redis,
url: System.get_env("RHEO_REDIS_URL", "redis://localhost:6379")}}
]Options: :url (redis://host:port), or :host / :port, plus :name for
the Redix process.
Model C
| Rheo | Redis |
|---|---|
event.sequence | Counter + ZSET index per partition |
lease.receipt | Stream entry id |
lease.lease_id | Fence hash (stale ACK → :stale_lease) |
fetch | XREADGROUP + fenced reclaim via XPENDING/XCLAIM |
ack | Fence check then XACK |
Capabilities
Durable, distributed, partitioned, contiguous frontier, replay, native
consumer groups / pending list / reclaim / blocking reads. No secondary
indexes — query scans stream ranges and filters in the adapter.
Wakeup
When Groups/Producers run, Rheo may start a reader Task that calls wait/2
(XREAD with BLOCK). Polling remains the fallback (ADR 025).
Local Redis
docker compose up -d redis
export RHEO_REDIS_URL=redis://localhost:6379
See 0.8 → 0.9 migration, ADR 026, and Article 16.