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
RabbitMQ hostname. Defaults to "localhost"
.
It looks for the value following this order:
- The OS environment variable
$YGGDRASIL_RABBITMQ_HOSTNAME
. - The configuration file.
- 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"]
RabbitMQ max retries for the backoff algorithm. Defaults to 12
.
It looks for the value following this order.
- The OS environment variable
$YGGDRASIL_RABBITMQ_MAX_RETRIES
. - The configuration file.
- 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).
RabbitMQ password. Defaults to "guest"
.
It looks for the value following this order:
- The OS environment variable
$YGGDRASIL_RABBITMQ_PASSWORD
. - The configuration file.
- 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"]
RabbitMQ port. Defaults to 5672
.
It looks for the value following this order:
- The OS environment variable
$YGGDRASIL_RABBITMQ_PORT
. - The configuration file.
- 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]
RabbitMQ slot size for the backoff algorithm. Defaults to 100
.
It looks for the value following this order.
- The OS environment variable
$YGGDRASIL_RABBITMQ_SLOT_SIZE
. - The configuration file.
- 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]
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]]
RabbitMQ username. Defaults to "guest"
.
It looks for the value following this order:
- The OS environment variable
$YGGDRASIL_RABBITMQ_USERNAME
. - The configuration file.
- 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"]
RabbitMQ virtual host. Defaults to "/"
.
It looks for the value following this order:
- The OS environment variable
$YGGDRASIL_RABBITMQ_VIRTUAL_HOST
. - The configuration file.
- 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: "/"]