Rheo.Broadway.Acknowledger (rheo v1.0.0)

Copy Markdown View Source

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:

OutcomeCall
successfulRheo.Producer.ack/3
failedRheo.Producer.nack/4 (default)
failed, on_failure: :rejectRheo.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.