AmqpSidecar. Broker behaviour
(amqp_sidecar v0.1.0)
Copy Markdown
Behaviour abstracting the AMQP client.
The production implementation (AmqpSidecar.Broker.AMQP) talks to RabbitMQ.
Tests inject AmqpSidecar.Broker.Mock (Mox) via
Application.get_env(:amqp_sidecar, :broker).
Summary
Types
Callbacks
@callback ack(channel(), non_neg_integer()) :: :ok | {:error, term()}
@callback close_connection(connection()) :: :ok | {:error, term()}
@callback open_channel(connection()) :: {:ok, channel()} | {:error, term()}
@callback open_connection(String.t()) :: {:ok, connection()} | {:error, term()}
@callback reject(channel(), non_neg_integer(), keyword()) :: :ok | {:error, term()}