Freddy.Core.Queue (freddy v0.17.1)

Queue configuration

Fields

  • :name - Queue name. If left empty, a server named queue with unique name will be declared.
  • :opts - Queue options, see below.

Options

  • :durable - If set, keeps the Queue between restarts of the broker.
  • :auto_delete - If set, deletes the Queue once all subscribers disconnect.
  • :exclusive - If set, only one subscriber can consume from the Queue.
  • :passive - If set, raises an error unless the queue already exists.
  • :nowait - If set, the server will not respond to the method and client will not wait for a reply. Default is false.
  • :arguments - A set of arguments for the declaration. The syntax and semantics of these arguments depends on the server implementation.

Examples

Server-named queue

iex> %Freddy.Core.Queue{exclusive: true, auto_delete: true}

Client-named queue

iex> %Freddy.Core.Queue{name: "notifications", durable: true}

Link to this section Summary

Functions

Create queue configuration from keyword list or Freddy.Core.Queue structure.

Link to this section Types

Specs

options() :: [
  durable: boolean(),
  auto_delete: boolean(),
  exclusive: boolean(),
  passive: boolean(),
  nowait: boolean(),
  arguments: Keyword.t()
]

Specs

t() :: %Freddy.Core.Queue{name: String.t(), opts: options()}

Link to this section Functions

Specs

new(t() | Keyword.t()) :: t()

Create queue configuration from keyword list or Freddy.Core.Queue structure.