ex_rabbit_pool v1.0.2 ExRabbitPool.Worker.RabbitConnection View Source

Link to this section Summary

Functions

Returns a specification to start this module under a supervisor.

Traps exits so all the linked connection and multiplexed channels can be restarted by this worker. Triggers an async connection but making sure future calls need to wait for the connection to happen before them.

Link to this section Functions

Link to this function

checkin_channel(pid, channel) View Source
checkin_channel(pid(), AMQP.Channel.t()) :: :ok

Link to this function

checkout_channel(pid) View Source
checkout_channel(pid()) ::
  {:ok, AMQP.Channel.t()} | {:error, :disconnected} | {:error, :out_of_channels}

Returns a specification to start this module under a supervisor.

See Supervisor.

Link to this function

create_channel(pid) View Source
create_channel(pid()) :: {:ok, AMQP.Channel.t()} | {:error, any()}

Link to this function

get_connection(pid) View Source
get_connection(pid()) :: {:ok, AMQP.Connection.t()} | {:error, :disconnected}

Traps exits so all the linked connection and multiplexed channels can be restarted by this worker. Triggers an async connection but making sure future calls need to wait for the connection to happen before them.

  • config is the rabbitmq config settings