# `Rheo.Broadway.Acknowledger`
[🔗](https://github.com/thanos/rheo/blob/v1.0.0/lib/rheo/broadway/acknowledger.ex#L3)

`Broadway.Acknowledger` that settles Rheo leases.

Attached by `Rheo.Broadway.transform/2`; you never build it by hand. Broadway
calls `ack/3` once per producer with the batch of successful and failed
messages, and each lease is settled with its own fencing token through
`Rheo.Producer.ack/3`, `nack/4`, or `reject/4`:

| Outcome | Call |
|---|---|
| successful | `Rheo.Producer.ack/3` |
| failed | `Rheo.Producer.nack/4` (default) |
| failed, `on_failure: :reject` | `Rheo.Producer.reject/4` |

`nack` returns the delivery for retry, or dead-letters it once
`attempt >= max_attempts` for the group. `reject` dead-letters immediately.
Each helper also releases the producer's inflight entry, so renewal stops and
a `:max_demand` slot is freed even when the durable settle fails — a lease
that cannot be settled has been fenced or will expire, and the backend
redelivers it. Failed settles emit `[:rheo, :ack, :error]`,
`[:rheo, :retry, :error]`, or `[:rheo, :reject, :error]` with the `event_id`
and a `Rheo.Settle` reason.

## Per-message override

    Broadway.Message.configure_ack(message, on_failure: :reject)

See `Rheo.Broadway` and ADR 018.

---

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