Rheo.Backend.Mongo is the original durable backend: searchable BSON event log
plus per-group deliveries in MongoDB.
Start
{Rheo,
name: MyRheo,
backend: {Rheo.Backend.Mongo, url: "mongodb://localhost:27017/rheo", pool_size: 5}}Shorthand (defaults to Mongo when :backend is omitted):
{Rheo, name: MyRheo, url: "mongodb://localhost:27017/rheo"}Always run indexes once per deployment:
:ok = Rheo.ensure_indexes(rheo: MyRheo)Capabilities
Rheo.Backend.Mongo.capabilities()
# %Rheo.Backend.Capabilities{
# guarantees: %{durable: true, distributed: false, partitions: true, …},
# mechanisms: %{secondary_indexes: true, batch_writes: true, …}
# }Local development
docker compose up -d # if the repo provides a Mongo service
export RHEO_MONGO_URL=mongodb://localhost:27017/rheo_dev
config :rheo,
start_on_application: true,
mongo_url: System.get_env("RHEO_MONGO_URL")Prefer explicit supervision in applications.
Schema sketch
| Collection | Role |
|---|---|
| streams / sequences | Stream registry and per-partition counters |
| events | Immutable log (payload + lineage) |
| groups | Cursors and frontiers |
| deliveries | Leases, attempts, DLQ per group |
Details: ADR 008, MongoDB as a searchable event log.