yggdrasil_rabbitmq v4.1.1 Yggdrasil.Settings.RabbitMQ View Source

This module defines the available settings for RabbitMQ in Yggdrasil.

Link to this section Summary

Functions

RabbitMQ hostname. Defaults to "localhost"

RabbitMQ max retries for the backoff algorithm. Defaults to 12

RabbitMQ password. Defaults to "guest"

RabbitMQ port. Defaults to 5672

RabbitMQ slot size for the backoff algorithm. Defaults to 100

RabbitMQ subscriber options. They are options for :poolboy. Defaults to [size: 5, max_overflow: 10].

RabbitMQ username. Defaults to "guest"

RabbitMQ virtual host. Defaults to "/"

Link to this section Functions

Link to this function yggdrasil_rabbitmq_hostname() View Source

RabbitMQ hostname. Defaults to "localhost".

It looks for the value following this order:

  1. The OS environment variable $YGGDRASIL_RABBITMQ_HOSTNAME.
  2. The configuration file.
  3. The default value "localhost"

If the hostname is defined using a namespace, then the name of the OS variable should be $<NAMESPACE>_YGGDRASIL_RABBITMQ_HOSTNAME where NAMESPACE is the snake case version of the actual namespace e.g MyApp.Namespace would be MYAPP_NAMESPACE.

config :yggdrasil, <NAMESPACE>
  rabbitmq: [hostname: "localhost"]
Link to this function yggdrasil_rabbitmq_max_retries() View Source

RabbitMQ max retries for the backoff algorithm. Defaults to 12.

It looks for the value following this order.

  1. The OS environment variable $YGGDRASIL_RABBITMQ_MAX_RETRIES.
  2. The configuration file.
  3. The default value 12.

If the max retries are defined using a namespace, then the name of the OS variable should be $<NAMESPACE>_YGGDRASIL_RABBITMQ_MAX_RETRIES where NAMESPACE is the snake case version of the actual namespace e.g. MyApp.Namespace would be MYAPP_NAMESPACE.

config :yggdrasil, <NAMESPACE>,
  rabbitmq: [max_retries: 12]

The backoff algorithm is exponential:

backoff_time = pow(2, retries) * random(1, slot) ms

when retries <= MAX_RETRIES and slot is given by the configuration variable YGGDRASIL_RABBITMQ_SLOT_SIZE (defaults to 100 ms).

Link to this function yggdrasil_rabbitmq_password() View Source

RabbitMQ password. Defaults to "guest".

It looks for the value following this order:

  1. The OS environment variable $YGGDRASIL_RABBITMQ_PASSWORD.
  2. The configuration file.
  3. The default value "guest".

If the password is defined using a namespace, then the name of the OS variable should be $<NAMESPACE>_YGGDRASIL_RABBITMQ_PASSWORD where NAMESPACE is the snake case version of the actual namespace e.g MyApp.Namespace would be MYAPP_NAMESPACE.

config :yggdrasil, <NAMESPACE>
  rabbitmq: [password: "guest"]
Link to this function yggdrasil_rabbitmq_port() View Source

RabbitMQ port. Defaults to 5672.

It looks for the value following this order:

  1. The OS environment variable $YGGDRASIL_RABBITMQ_PORT.
  2. The configuration file.
  3. The default value 5672.

If the port is defined using a namespace, then the name of the OS variable should be $<NAMESPACE>_YGGDRASIL_RABBITMQ_PORT where NAMESPACE is the snake case version of the actual namespace e.g MyApp.Namespace would be MYAPP_NAMESPACE.

config :yggdrasil, <NAMESPACE>
  rabbitmq: [port: 5672]
Link to this function yggdrasil_rabbitmq_slot_size() View Source

RabbitMQ slot size for the backoff algorithm. Defaults to 100.

It looks for the value following this order.

  1. The OS environment variable $YGGDRASIL_RABBITMQ_SLOT_SIZE.
  2. The configuration file.
  3. The default value 100.

If slot sizes is defined using a namespace, then the name of the OS variable should be $<NAMESPACE>_YGGDRASIL_RABBITMQ_SLOT_SIZE where NAMESPACE is the snake case version of the actual namespace e.g. MyApp.Namespace would be MYAPP_NAMESPACE.

config :yggdrasil, <NAMESPACE>,
  rabbitmq: [slot_size: 100]
Link to this function yggdrasil_rabbitmq_subscriber_options() View Source

RabbitMQ subscriber options. They are options for :poolboy. Defaults to [size: 5, max_overflow: 10].

config :yggdrasil, <NAMESPACE>
  rabbitmq: [subscriber_options: [size: 5, max_overflow: 10]]
Link to this function yggdrasil_rabbitmq_username() View Source

RabbitMQ username. Defaults to "guest".

It looks for the value following this order:

  1. The OS environment variable $YGGDRASIL_RABBITMQ_USERNAME.
  2. The configuration file.
  3. The default value "guest".

If the username is defined using a namespace, then the name of the OS variable should be $<NAMESPACE>_YGGDRASIL_RABBITMQ_USERNAME where NAMESPACE is the snake case version of the actual namespace e.g MyApp.Namespace would be MYAPP_NAMESPACE.

config :yggdrasil, <NAMESPACE>
  rabbitmq: [username: "guest"]
Link to this function yggdrasil_rabbitmq_virtual_host() View Source

RabbitMQ virtual host. Defaults to "/".

It looks for the value following this order:

  1. The OS environment variable $YGGDRASIL_RABBITMQ_VIRTUAL_HOST.
  2. The configuration file.
  3. The default value "/".

If the virtual host is defined using a namespace, then the name of the OS variable should be $<NAMESPACE>_YGGDRASIL_RABBITMQ_VIRTUAL_HOST where NAMESPACE is the snake case version of the actual namespace e.g MyApp.Namespace would be MYAPP_NAMESPACE.

config :yggdrasil, <NAMESPACE>
  rabbitmq: [virtual_host: "/"]