Yggdrasil.RabbitMQ.Connection.Pool (Yggdrasil for RabbitMQ v6.0.0) View Source

RabbitMQ connection pool.

Link to this section Summary

Types

Channel callback function.

Channel callback return.

Callback for running functions using RabbitMQ channels.

Functions

Returns a specification to start this module under a supervisor.

Starts a connection pool using an initial client. Optionally, it receives some Supervisor options.

Stops a RabbitMQ connection pool. Optionally, it receives a stop reason (defaults to :normal) and timeout (defaults to :infinity).

Runs a channel callback in a client.

Link to this section Types

Specs

channel_callback() :: (AMQP.Channel.t() -> channel_callback_return())

Channel callback function.

Link to this type

channel_callback_return()

View Source

Specs

channel_callback_return() :: {:ok, term()} | {:error, term()} | term()

Channel callback return.

Specs

rabbit_callback() ::
  (Yggdrasil.Channel.t() -> :ok | {:ok, term()} | {:error, term()})

Callback for running functions using RabbitMQ channels.

Link to this section Functions

Returns a specification to start this module under a supervisor.

See Supervisor.

Link to this function

start_link(client, options \\ [])

View Source

Specs

Starts a connection pool using an initial client. Optionally, it receives some Supervisor options.

Link to this function

stop(pool, reason \\ :normal, timeout \\ :infinity)

View Source

Specs

stop(Supervisor.supervisor(), term(), :infinity | non_neg_integer()) :: :ok

Stops a RabbitMQ connection pool. Optionally, it receives a stop reason (defaults to :normal) and timeout (defaults to :infinity).

Link to this function

with_channel(client, callback)

View Source

Specs

Runs a channel callback in a client.