freddy v0.12.0 Freddy.Connection

Stable AMQP connection.

Link to this section Summary

Functions

Closes an AMQP connection. This will cause process to reconnect

Returns underlying AMQP connection structure

Opens a new AMQP channel

Start a new AMQP connection. See AMQP.Connection.open/1 for supported connection options

Stops the connection process

Link to this section Types

Link to this type connection()
connection() :: GenServer.server()

Link to this section Functions

Link to this function close(connection, timeout \\ 5000)
close(connection(), timeout()) :: :ok | {:error, reason :: term()}

Closes an AMQP connection. This will cause process to reconnect.

Link to this function get_connection(connection)
get_connection(connection()) :: {:ok, AMQP.Connection.t()} | {:error, :closed}

Returns underlying AMQP connection structure

Link to this function open_channel(connection)
open_channel(connection()) ::
  {:ok, AMQP.Channel.t()} | {:error, reason :: term()}

Opens a new AMQP channel

Link to this function start_link(connection_opts \\ [], gen_server_opts \\ [])

Start a new AMQP connection. See AMQP.Connection.open/1 for supported connection options.

Link to this function stop(connection)

Stops the connection process