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

CollectionRole
streams / sequencesStream registry and per-partition counters
eventsImmutable log (payload + lineage)
groupsCursors and frontiers
deliveriesLeases, attempts, DLQ per group

Details: ADR 008, MongoDB as a searchable event log.