View Source ExRabbitPool.Worker.RabbitConnection (current_rabbit_pool v1.1.1)
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
@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
@spec start_link(ExRabbitPool.Worker.RabbitConnection.State.config()) :: GenServer.on_start()