itk_queue v0.11.6 ITKQueue.Channel View Source

Provides methods for interacting with AMQP channels.

Link to this section Summary

Functions

Declares a queue and binds the routing key to it on the given channel. This sets up a queue so that messages sent with the routing key get directed to the queue

Closes a channel

Opens a topic channel on the given connection

Opens a topic channel on the given connection, and activate confirm

Wait for publisher confirms, for use in publisher channel

Link to this section Functions

Link to this function bind(channel, queue_name, routing_key, options \\ []) View Source
bind(
  channel :: AMQP.Channel.t(),
  queue_name :: String.t(),
  routing_key :: String.t(),
  options :: Keyword.t()
) :: AMQP.Channel.t()

Declares a queue and binds the routing key to it on the given channel. This sets up a queue so that messages sent with the routing key get directed to the queue.

Returns the given AMQP.Channel.

Link to this function close(channel) View Source
close(channel :: AMQP.Channel.t()) :: :ok

Closes a channel.

Link to this function declare_queue(channel, queue_name, options \\ []) View Source
declare_queue(
  channel :: AMQP.Channel.t(),
  queue_name :: String.t(),
  options :: Keyword.t()
) :: AMQP.Channel.t()

Declares a queue.

Link to this function delete_queue(channel, queue_name) View Source
delete_queue(channel :: AMQP.Channel.t(), queue_name :: String.t()) ::
  AMQP.Channel.t()

Deletes a queue.

Link to this function open(connection) View Source
open(connection :: AMQP.Connection.t()) :: AMQP.Channel.t()

Opens a topic channel on the given connection.

Returns an AMQP.Channel.

Link to this function open_for_publish(connection, handler) View Source
open_for_publish(connection :: AMQP.Connection.t(), handler :: pid()) ::
  AMQP.Channel.t()

Opens a topic channel on the given connection, and activate confirm.

Returns an AMQP.Channel.

Link to this function wait_for_confirms(pid, channel) View Source
wait_for_confirms(pid :: pid(), channel :: AMQP.Channel.t()) :: :confirm

Wait for publisher confirms, for use in publisher channel.