ExRabbitMQAdmin.Binding (ex_rabbitmq_admin v0.1.4)

View Source

RabbitMQ Bindings.

Summary

Functions

Create a binding between two exchanges in a given virtual host.

Create a binding between an exchange and a queue in a given virtual host.

List all bindings on the RabbitMQ cluster.

List all bindings between two exchanges in a given virtual host.

List all bindings between an exchange and a queue in a given virtual host.

List all bindings in a given virtual host.

Functions

create_exchange_exchange_binding(client, vhost, src, dest, opts)

@spec create_exchange_exchange_binding(
  client :: Tesla.Client.t(),
  vhost :: String.t(),
  src :: String.t(),
  dest :: String.t(),
  opts :: Keyword.t()
) :: {:ok, Tesla.Env.t()} | no_return()

Create a binding between two exchanges in a given virtual host.

Params

  • client - Tesla client used to perform the request.

  • vhost - type: string, required: true

  • src - type: string, required: true

  • dest - type: string, required: true

  • :routing_key (String.t/0) - Required. The routing key used to route the message to its destination.

  • :arguments (map of String.t/0 keys and term/0 values) - Optional binding arguments passed to RabbitMQ when creating the binding. Please consult the official documentation for supported arguments (as they can vary for exchange type).

The response will contain a Location header with the URI of the newly created binding.

create_exchange_queue_binding(client, vhost, exchange, queue, opts)

@spec create_exchange_queue_binding(
  client :: Tesla.Client.t(),
  vhost :: String.t(),
  exchange :: String.t(),
  queue :: String.t(),
  opts :: Keyword.t()
) :: {:ok, Tesla.Env.t()} | no_return()

Create a binding between an exchange and a queue in a given virtual host.

Params

  • client - Tesla client used to perform the request.

  • vhost - type: string, required: true

  • exchange - type: string, required: true

  • queue - type: string, required: true

  • :routing_key (String.t/0) - Required. The routing key used to route the message to its destination.

  • :arguments (map of String.t/0 keys and term/0 values) - Optional binding arguments passed to RabbitMQ when creating the binding. Please consult the official documentation for supported arguments (as they can vary for exchange type).

The response will contain a Location header with the URI of the newly created binding.

list_bindings(client)

@spec list_bindings(client :: Tesla.Client.t()) ::
  {:ok, Tesla.Env.t()} | {:error, term()}

List all bindings on the RabbitMQ cluster.

list_exchange_exchange_bindings(client, vhost, src, dest)

@spec list_exchange_exchange_bindings(
  client :: Tesla.Client.t(),
  vhost :: String.t(),
  src :: String.t(),
  dest :: String.t()
) :: {:ok, Tesla.Env.t()} | {:error, term()}

List all bindings between two exchanges in a given virtual host.

list_exchange_queue_bindings(client, vhost, exchange, queue)

@spec list_exchange_queue_bindings(
  client :: Tesla.Client.t(),
  vhost :: String.t(),
  exchange :: String.t(),
  queue :: String.t()
) :: {:ok, Tesla.Env.t()} | {:error, term()}

List all bindings between an exchange and a queue in a given virtual host.

list_vhost_bindings(client, vhost)

@spec list_vhost_bindings(client :: Tesla.Client.t(), vhost :: String.t()) ::
  {:ok, Tesla.Env.t()} | {:error, term()}

List all bindings in a given virtual host.

Params

  • client - Tesla client used to perform the request.
  • vhost - type: string, required: true