yggdrasil_rabbitmq v4.1.5 Yggdrasil.Settings.RabbitMQ View Source
This module defines the available settings for RabbitMQ in Yggdrasil.
Link to this section Summary
Functions
RabbitMQ heartbeat. Defaults to 10
seconds
RabbitMQ heartbeat. Defaults to 10
seconds
RabbitMQ hostname. Defaults to "localhost"
RabbitMQ hostname. Defaults to "localhost"
RabbitMQ max retries for the backoff algorithm. Defaults to 12
RabbitMQ max retries for the backoff algorithm. Defaults to 12
RabbitMQ password. Defaults to "guest"
RabbitMQ password. Defaults to "guest"
RabbitMQ port. Defaults to 5672
RabbitMQ port. Defaults to 5672
RabbitMQ slot size for the backoff algorithm. Defaults to 100
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 subscriber options. They are options for :poolboy
. Defaults to
[size: 5, max_overflow: 10].
RabbitMQ username. Defaults to "guest"
RabbitMQ username. Defaults to "guest"
RabbitMQ virtual host. Defaults to "/"
RabbitMQ virtual host. Defaults to "/"
Link to this section Functions
RabbitMQ heartbeat. Defaults to 10
seconds.
A call to Yggdrasil.Settings.RabbitMQ.yggdrasil_rabbitmq_heartbeat()
will:
- If the OS environment variable is not
nil
, will return its casted value. - If the OS environment variable is
nil
, then it will try to get the value in the configuration file. - If the configuration file does not contain the value, will return the default value if it’s defined.
- If the default value is not defined and is not required, it will
return
nil
, otherwise it will error.
A call to Yggdrasil.Settings.RabbitMQ.yggdrasil_rabbitmq_heartbeat(namespace)
will try
to do the same as before, but using a namespace (atom()
). This is
useful for separating the different configurations values for the same
variable.
The OS environment variable expected is
$YGGDRASIL_RABBITMQ_HEARTBEAT
. If there is a namespace, for
example Namespace
, the OS environment variable would be
$NAMESPACE_YGGDRASIL_RABBITMQ_HEARTBEAT
.
The expected application configuration is as follows:
config :yggdrasil,
rabbitmq: [
heartbeat: integer() # Defaults to 10
]
and with a namespace, for example Namespace
, the expected application
configuration would be:
config :yggdrasil, Namespace,
rabbitmq: [
heartbeat: integer() # Defaults to 10
]
For testing purposes, the value can be reloaded at runtime with the
function Yggdrasil.Settings.RabbitMQ.yggdrasil_rabbitmq_heartbeat(namespace, :reload)
where
namespace
can be nil
or an atom()
.
RabbitMQ heartbeat. Defaults to 10
seconds.
Same as Yggdrasil.Settings.RabbitMQ.yggdrasil_rabbitmq_heartbeat/0
but fails on error.
It can receive also a namespace when needed.
RabbitMQ hostname. Defaults to "localhost"
.
A call to Yggdrasil.Settings.RabbitMQ.yggdrasil_rabbitmq_hostname()
will:
- If the OS environment variable is not
nil
, will return its casted value. - If the OS environment variable is
nil
, then it will try to get the value in the configuration file. - If the configuration file does not contain the value, will return the default value if it’s defined.
- If the default value is not defined and is not required, it will
return
nil
, otherwise it will error.
A call to Yggdrasil.Settings.RabbitMQ.yggdrasil_rabbitmq_hostname(namespace)
will try
to do the same as before, but using a namespace (atom()
). This is
useful for separating the different configurations values for the same
variable.
The OS environment variable expected is
$YGGDRASIL_RABBITMQ_HOSTNAME
. If there is a namespace, for
example Namespace
, the OS environment variable would be
$NAMESPACE_YGGDRASIL_RABBITMQ_HOSTNAME
.
The expected application configuration is as follows:
config :yggdrasil,
rabbitmq: [
hostname: binary() # Defaults to "localhost"
]
and with a namespace, for example Namespace
, the expected application
configuration would be:
config :yggdrasil, Namespace,
rabbitmq: [
hostname: binary() # Defaults to "localhost"
]
For testing purposes, the value can be reloaded at runtime with the
function Yggdrasil.Settings.RabbitMQ.yggdrasil_rabbitmq_hostname(namespace, :reload)
where
namespace
can be nil
or an atom()
.
RabbitMQ hostname. Defaults to "localhost"
.
Same as Yggdrasil.Settings.RabbitMQ.yggdrasil_rabbitmq_hostname/0
but fails on error.
It can receive also a namespace when needed.
RabbitMQ max retries for the backoff algorithm. Defaults to 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 Elixir.Yggdrasil.Settings.RabbitMQ.yggdrasil_rabbitmq_slot_size/0
(defaults to 100
ms).
A call to Yggdrasil.Settings.RabbitMQ.yggdrasil_rabbitmq_max_retries()
will:
- If the OS environment variable is not
nil
, will return its casted value. - If the OS environment variable is
nil
, then it will try to get the value in the configuration file. - If the configuration file does not contain the value, will return the default value if it’s defined.
- If the default value is not defined and is not required, it will
return
nil
, otherwise it will error.
A call to Yggdrasil.Settings.RabbitMQ.yggdrasil_rabbitmq_max_retries(namespace)
will try
to do the same as before, but using a namespace (atom()
). This is
useful for separating the different configurations values for the same
variable.
The OS environment variable expected is
$YGGDRASIL_RABBITMQ_MAX_RETRIES
. If there is a namespace, for
example Namespace
, the OS environment variable would be
$NAMESPACE_YGGDRASIL_RABBITMQ_MAX_RETRIES
.
The expected application configuration is as follows:
config :yggdrasil,
rabbitmq: [
max_retries: integer() # Defaults to 12
]
and with a namespace, for example Namespace
, the expected application
configuration would be:
config :yggdrasil, Namespace,
rabbitmq: [
max_retries: integer() # Defaults to 12
]
For testing purposes, the value can be reloaded at runtime with the
function Yggdrasil.Settings.RabbitMQ.yggdrasil_rabbitmq_max_retries(namespace, :reload)
where
namespace
can be nil
or an atom()
.
RabbitMQ max retries for the backoff algorithm. Defaults to 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 Elixir.Yggdrasil.Settings.RabbitMQ.yggdrasil_rabbitmq_slot_size/0
(defaults to 100
ms).
Same as Yggdrasil.Settings.RabbitMQ.yggdrasil_rabbitmq_max_retries/0
but fails on error.
It can receive also a namespace when needed.
RabbitMQ password. Defaults to "guest"
.
A call to Yggdrasil.Settings.RabbitMQ.yggdrasil_rabbitmq_password()
will:
- If the OS environment variable is not
nil
, will return its casted value. - If the OS environment variable is
nil
, then it will try to get the value in the configuration file. - If the configuration file does not contain the value, will return the default value if it’s defined.
- If the default value is not defined and is not required, it will
return
nil
, otherwise it will error.
A call to Yggdrasil.Settings.RabbitMQ.yggdrasil_rabbitmq_password(namespace)
will try
to do the same as before, but using a namespace (atom()
). This is
useful for separating the different configurations values for the same
variable.
The OS environment variable expected is
$YGGDRASIL_RABBITMQ_PASSWORD
. If there is a namespace, for
example Namespace
, the OS environment variable would be
$NAMESPACE_YGGDRASIL_RABBITMQ_PASSWORD
.
The expected application configuration is as follows:
config :yggdrasil,
rabbitmq: [
password: binary() # Defaults to "guest"
]
and with a namespace, for example Namespace
, the expected application
configuration would be:
config :yggdrasil, Namespace,
rabbitmq: [
password: binary() # Defaults to "guest"
]
For testing purposes, the value can be reloaded at runtime with the
function Yggdrasil.Settings.RabbitMQ.yggdrasil_rabbitmq_password(namespace, :reload)
where
namespace
can be nil
or an atom()
.
RabbitMQ password. Defaults to "guest"
.
Same as Yggdrasil.Settings.RabbitMQ.yggdrasil_rabbitmq_password/0
but fails on error.
It can receive also a namespace when needed.
RabbitMQ port. Defaults to 5672
.
A call to Yggdrasil.Settings.RabbitMQ.yggdrasil_rabbitmq_port()
will:
- If the OS environment variable is not
nil
, will return its casted value. - If the OS environment variable is
nil
, then it will try to get the value in the configuration file. - If the configuration file does not contain the value, will return the default value if it’s defined.
- If the default value is not defined and is not required, it will
return
nil
, otherwise it will error.
A call to Yggdrasil.Settings.RabbitMQ.yggdrasil_rabbitmq_port(namespace)
will try
to do the same as before, but using a namespace (atom()
). This is
useful for separating the different configurations values for the same
variable.
The OS environment variable expected is
$YGGDRASIL_RABBITMQ_PORT
. If there is a namespace, for
example Namespace
, the OS environment variable would be
$NAMESPACE_YGGDRASIL_RABBITMQ_PORT
.
The expected application configuration is as follows:
config :yggdrasil,
rabbitmq: [
port: integer() # Defaults to 5672
]
and with a namespace, for example Namespace
, the expected application
configuration would be:
config :yggdrasil, Namespace,
rabbitmq: [
port: integer() # Defaults to 5672
]
For testing purposes, the value can be reloaded at runtime with the
function Yggdrasil.Settings.RabbitMQ.yggdrasil_rabbitmq_port(namespace, :reload)
where
namespace
can be nil
or an atom()
.
RabbitMQ port. Defaults to 5672
.
Same as Yggdrasil.Settings.RabbitMQ.yggdrasil_rabbitmq_port/0
but fails on error.
It can receive also a namespace when needed.
RabbitMQ slot size for the backoff algorithm. Defaults to 100
.
A call to Yggdrasil.Settings.RabbitMQ.yggdrasil_rabbitmq_slot_size()
will:
- If the OS environment variable is not
nil
, will return its casted value. - If the OS environment variable is
nil
, then it will try to get the value in the configuration file. - If the configuration file does not contain the value, will return the default value if it’s defined.
- If the default value is not defined and is not required, it will
return
nil
, otherwise it will error.
A call to Yggdrasil.Settings.RabbitMQ.yggdrasil_rabbitmq_slot_size(namespace)
will try
to do the same as before, but using a namespace (atom()
). This is
useful for separating the different configurations values for the same
variable.
The OS environment variable expected is
$YGGDRASIL_RABBITMQ_SLOT_SIZE
. If there is a namespace, for
example Namespace
, the OS environment variable would be
$NAMESPACE_YGGDRASIL_RABBITMQ_SLOT_SIZE
.
The expected application configuration is as follows:
config :yggdrasil,
rabbitmq: [
slot_size: integer() # Defaults to 100
]
and with a namespace, for example Namespace
, the expected application
configuration would be:
config :yggdrasil, Namespace,
rabbitmq: [
slot_size: integer() # Defaults to 100
]
For testing purposes, the value can be reloaded at runtime with the
function Yggdrasil.Settings.RabbitMQ.yggdrasil_rabbitmq_slot_size(namespace, :reload)
where
namespace
can be nil
or an atom()
.
RabbitMQ slot size for the backoff algorithm. Defaults to 100
.
Same as Yggdrasil.Settings.RabbitMQ.yggdrasil_rabbitmq_slot_size/0
but fails on error.
It can receive also a namespace when needed.
RabbitMQ subscriber options. They are options for :poolboy
. Defaults to
[size: 5, max_overflow: 10].
A call to Yggdrasil.Settings.RabbitMQ.yggdrasil_rabbitmq_subscriber_options()
will:
- If the OS environment variable is not
nil
, will return its casted value. - If the OS environment variable is
nil
, then it will try to get the value in the configuration file. - If the configuration file does not contain the value, will return the default value if it’s defined.
- If the default value is not defined and is not required, it will
return
nil
, otherwise it will error.
A call to Yggdrasil.Settings.RabbitMQ.yggdrasil_rabbitmq_subscriber_options(namespace)
will try
to do the same as before, but using a namespace (atom()
). This is
useful for separating the different configurations values for the same
variable.
The OS environment variable expected is
$YGGDRASIL_RABBITMQ_SUBSCRIBER_OPTIONS
. If there is a namespace, for
example Namespace
, the OS environment variable would be
$NAMESPACE_YGGDRASIL_RABBITMQ_SUBSCRIBER_OPTIONS
.
The expected application configuration is as follows:
config :yggdrasil,
rabbitmq: [
subscriber_options: () # Defaults to [size: 5, max_overflow: 10]
]
and with a namespace, for example Namespace
, the expected application
configuration would be:
config :yggdrasil, Namespace,
rabbitmq: [
subscriber_options: () # Defaults to [size: 5, max_overflow: 10]
]
For testing purposes, the value can be reloaded at runtime with the
function Yggdrasil.Settings.RabbitMQ.yggdrasil_rabbitmq_subscriber_options(namespace, :reload)
where
namespace
can be nil
or an atom()
.
RabbitMQ subscriber options. They are options for :poolboy
. Defaults to
[size: 5, max_overflow: 10].
Same as Yggdrasil.Settings.RabbitMQ.yggdrasil_rabbitmq_subscriber_options/0
but fails on error.
It can receive also a namespace when needed.
RabbitMQ username. Defaults to "guest"
.
A call to Yggdrasil.Settings.RabbitMQ.yggdrasil_rabbitmq_username()
will:
- If the OS environment variable is not
nil
, will return its casted value. - If the OS environment variable is
nil
, then it will try to get the value in the configuration file. - If the configuration file does not contain the value, will return the default value if it’s defined.
- If the default value is not defined and is not required, it will
return
nil
, otherwise it will error.
A call to Yggdrasil.Settings.RabbitMQ.yggdrasil_rabbitmq_username(namespace)
will try
to do the same as before, but using a namespace (atom()
). This is
useful for separating the different configurations values for the same
variable.
The OS environment variable expected is
$YGGDRASIL_RABBITMQ_USERNAME
. If there is a namespace, for
example Namespace
, the OS environment variable would be
$NAMESPACE_YGGDRASIL_RABBITMQ_USERNAME
.
The expected application configuration is as follows:
config :yggdrasil,
rabbitmq: [
username: binary() # Defaults to "guest"
]
and with a namespace, for example Namespace
, the expected application
configuration would be:
config :yggdrasil, Namespace,
rabbitmq: [
username: binary() # Defaults to "guest"
]
For testing purposes, the value can be reloaded at runtime with the
function Yggdrasil.Settings.RabbitMQ.yggdrasil_rabbitmq_username(namespace, :reload)
where
namespace
can be nil
or an atom()
.
RabbitMQ username. Defaults to "guest"
.
Same as Yggdrasil.Settings.RabbitMQ.yggdrasil_rabbitmq_username/0
but fails on error.
It can receive also a namespace when needed.
RabbitMQ virtual host. Defaults to "/"
.
A call to Yggdrasil.Settings.RabbitMQ.yggdrasil_rabbitmq_virtual_host()
will:
- If the OS environment variable is not
nil
, will return its casted value. - If the OS environment variable is
nil
, then it will try to get the value in the configuration file. - If the configuration file does not contain the value, will return the default value if it’s defined.
- If the default value is not defined and is not required, it will
return
nil
, otherwise it will error.
A call to Yggdrasil.Settings.RabbitMQ.yggdrasil_rabbitmq_virtual_host(namespace)
will try
to do the same as before, but using a namespace (atom()
). This is
useful for separating the different configurations values for the same
variable.
The OS environment variable expected is
$YGGDRASIL_RABBITMQ_VIRTUAL_HOST
. If there is a namespace, for
example Namespace
, the OS environment variable would be
$NAMESPACE_YGGDRASIL_RABBITMQ_VIRTUAL_HOST
.
The expected application configuration is as follows:
config :yggdrasil,
rabbitmq: [
virtual_host: binary() # Defaults to "/"
]
and with a namespace, for example Namespace
, the expected application
configuration would be:
config :yggdrasil, Namespace,
rabbitmq: [
virtual_host: binary() # Defaults to "/"
]
For testing purposes, the value can be reloaded at runtime with the
function Yggdrasil.Settings.RabbitMQ.yggdrasil_rabbitmq_virtual_host(namespace, :reload)
where
namespace
can be nil
or an atom()
.
RabbitMQ virtual host. Defaults to "/"
.
Same as Yggdrasil.Settings.RabbitMQ.yggdrasil_rabbitmq_virtual_host/0
but fails on error.
It can receive also a namespace when needed.