# `PhoenixMicro.Transport.RabbitMQ`
[🔗](https://github.com/iamkanishka/phoenix_micro/blob/v1.0.0/lib/phoenix_micro/transport/rabbitmq.ex#L1)

RabbitMQ transport adapter using the `amqp` Hex package.

`phoenix_micro` lists **no amqp dependency** — add it to YOUR app's `mix.exs`:

    {:amqp, "~> 3.3"}

> #### rebar3 / Windows note {: .warning}
>
> The `amqp` package depends on `rabbit_common`, an Erlang library that builds
> with **rebar3**. On Windows this requires `escript.exe` (part of the Erlang/OTP
> installation) to be on your `PATH`. If you see a rebar3 compile error, either:
>
> - Ensure Erlang/OTP is installed and `escript.exe` is on PATH, or
> - Use **NATS** or **Redis Streams** instead — both are pure Elixir with no
>   rebar3 or native-code dependencies.

## Features

- Persistent channels with automatic reconnection (exponential backoff).
- Per-consumer `basic.qos` prefetch for backpressure control.
- Dead-letter exchange (DLX) routing on NACK.
- Topic exchange routing with `#` and `*` wildcards (AMQP convention).
- Publisher confirms for reliable publishing.

## Configuration

    config :phoenix_micro,
      transports: [
        rabbitmq: [
          url: "amqp://guest:guest@localhost",
          exchange: "phoenix_micro",
          prefetch_count: 10,
          reconnect_interval: 2_000
        ]
      ]

# `child_spec`

```elixir
@spec child_spec(keyword()) :: Supervisor.child_spec()
```

Returns a specification to start this module under a supervisor.

See `Supervisor`.

# `start_link`

```elixir
@spec start_link(keyword()) :: GenServer.on_start()
```

---

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