Kombu.Pidbox.Mailbox (Kombu v0.1.0)

Copy Markdown View Source

Process Mailbox (kombu.pidbox.Mailbox).

Summary

Functions

Broadcasts command to all nodes without expecting a reply.

Binds the mailbox to a connection.

Core broadcast publisher and collector matching Mailbox._broadcast.

Sends command to destination expecting a reply.

Sends command to destination without expecting a reply.

Collects replies for ticket up to limit or timeout (Mailbox._collect).

Returns the node queue for hostname.

Returns the reply queue for this mailbox instance.

Broadcasts command to all nodes expecting multiple replies up to limit or timeout.

Publishes a reply message (Mailbox._publish_reply).

Types

t()

@type t() :: %Kombu.Pidbox.Mailbox{
  accept: term(),
  clock: term(),
  connection: term(),
  exchange: term(),
  namespace: term(),
  oid: term(),
  producer_pool: term(),
  queue_durable: term(),
  queue_exclusive: term(),
  queue_expires: term(),
  queue_ttl: term(),
  reply_exchange: term(),
  reply_queue_expires: term(),
  reply_queue_ttl: term(),
  serializer: term(),
  type: term(),
  unclaimed_pid: term()
}

Functions

abcast(mb, command, kwargs \\ %{}, opts \\ [])

@spec abcast(t(), String.t(), map() | keyword(), keyword()) :: :ok

Broadcasts command to all nodes without expecting a reply.

bind(mailbox, conn)

@spec bind(t(), Kombu.Connection.t()) :: t()

Binds the mailbox to a connection.

broadcast(mb, command, arguments, opts \\ [])

@spec broadcast(t(), String.t(), map() | keyword(), keyword()) :: [term()] | :ok

Core broadcast publisher and collector matching Mailbox._broadcast.

call(mb, destination, command, kwargs \\ %{}, opts \\ [])

@spec call(t(), [String.t()] | nil, String.t(), map() | keyword(), keyword()) :: [
  term()
]

Sends command to destination expecting a reply.

cast(mb, destination, command, kwargs \\ %{}, opts \\ [])

@spec cast(t(), [String.t()] | nil, String.t(), map() | keyword(), keyword()) :: :ok

Sends command to destination without expecting a reply.

collect(mb, ticket, opts \\ [])

@spec collect(t(), String.t(), keyword()) :: [term()]

Collects replies for ticket up to limit or timeout (Mailbox._collect).

get_queue(mb, hostname)

@spec get_queue(t(), String.t()) :: Kombu.Queue.t()

Returns the node queue for hostname.

get_reply_queue(mb)

@spec get_reply_queue(t()) :: Kombu.Queue.t()

Returns the reply queue for this mailbox instance.

multi_call(mb, command, kwargs \\ %{}, opts \\ [])

@spec multi_call(t(), String.t(), map() | keyword(), keyword()) :: [term()]

Broadcasts command to all nodes expecting multiple replies up to limit or timeout.

new(namespace, opts \\ [])

@spec new(String.t(), keyword()) :: t()

node(mailbox, hostname \\ nil, opts \\ [])

@spec node(t(), String.t() | nil, keyword()) :: Kombu.Pidbox.Node.t()

Creates a new Node for mailbox.

publish_reply(mb, reply, exchange, routing_key, ticket, opts \\ [])

@spec publish_reply(t(), term(), String.t(), String.t(), String.t(), keyword()) :: :ok

Publishes a reply message (Mailbox._publish_reply).