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
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.exeis 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.qosprefetch 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
]
]
Summary
Functions
Returns a specification to start this module under a supervisor.
Functions
@spec child_spec(keyword()) :: Supervisor.child_spec()
Returns a specification to start this module under a supervisor.
See Supervisor.
@spec start_link(keyword()) :: GenServer.on_start()