# `Chimeway.Dispatch.Oban`
[🔗](https://github.com/jonlunsford/chimeway/blob/v1.0.0/lib/chimeway/dispatch/oban.ex#L2)

Oban-backed dispatcher — satisfies `Chimeway.Dispatch` behaviour.

Configure via:

    config :chimeway, :dispatcher, Chimeway.Dispatch.Oban

Each notification produces one `Chimeway.Dispatch.ObanWorker` job per
delivery row. The queue is `:chimeway_delivery`.

## Transactional enqueue

Pass `multi: %Ecto.Multi{}` to `dispatch/2` to insert job rows inside the
same database transaction as the delivery rows:

    dispatcher.dispatch(notifications, multi: existing_multi)

When `:multi` is absent, jobs are inserted via direct `Oban.insert/2`.

## Runtime validation

If `:dispatcher` is configured as `Chimeway.Dispatch.Oban` but Oban is not
loaded, the dispatch call will fail at runtime with a clear error. Add Oban
as a non-optional dependency in your host application to avoid this.

# `enqueue_digest_flush`

---

*Consult [api-reference.md](api-reference.md) for complete listing*
