View Source ExRabbitPool.Worker.RabbitConnection (ex_rabbit_pool v1.1.0)

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
@spec checkin_channel(pid(), AMQP.Channel.t()) :: :ok
@spec 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.

@spec create_channel(pid()) :: {:ok, AMQP.Channel.t()} | {:error, any()}
@spec 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