# `PhoenixMicro.Middleware.Retry`
[🔗](https://github.com/iamkanishka/phoenix_micro/blob/v1.0.0/lib/phoenix_micro/middleware.ex#L120)

Middleware-level retry with exponential backoff.
This is complementary to Consumer-level retry — use this when you want
to retry at the middleware layer (e.g. transient DB errors) before
propagating failure to the Consumer's retry logic.

## Options (pass in consumer middleware list as `{Retry, max: 2}`):

    middleware [{PhoenixMicro.Middleware.Retry, max: 2, base_delay: 100}]

---

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