-
Notifications
You must be signed in to change notification settings - Fork 1
/
sys.config
49 lines (48 loc) · 2.34 KB
/
sys.config
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
%% This is an example default config file for rabl. In deployment
%% you'd add the rabl env vars to your riak advanced.config
[
{lager, [
{log_root, "./log/"},
{handlers, [
{lager_console_backend, [{level, info}]},
{lager_file_backend, [{file, "error.log"}, {level, error}]},
{lager_file_backend, [{file, "console.log"}, {level, info}]}
]}
]},
{rabl, [
%% the consumers to start up. Structure is a
%% list({Cnt::pos_integer(), AmqpURL::string()}) where Cnt
%% consumers of `sink_queue' will connect to `AmqpURL'. Have
%% a read of rabbitmq's amqp url spec, you can have auth and
%% heartbeat info in the URL.
{consumers, [{1, "amqp://localhost"}]},
%% as consumers above, but for producers to the local
%% `cluster_name' queue.
{producers, [{1, "amqp://localhost"}]},
%% how long to wait before attempting to re-establish a lost
%% connection to a rabbitmq cluster. Has different effect for
%% consumer and producer. For the consumer this is the
%% starting value for back-off of reconnects up to
%% `max_connection_retries' attempts. Each attempt doubles
%% the back-off. Geometric series warning (i.e. keep retries
%% reasonably low.) After all when the consumer fails, the
%% supervisor will just start another. For the producer
%% there is a single delay only. And this stops a rapid
%% cycles of connection attempts, thus preventing the
%% supervisor from crashing. After a failed connection
%% attempt, the delay, then the producer crashes and the
%% supervisor makes a new one.
{reconnect_delay_millis, 500},
%% see above
{max_connection_retries, 5},
{max_reconnect_delay_millis, 5000},
%% This is the queue to which the producer publishes
%% rablicaton messages.
{cluster_name, <<"local_cluster">>},
%% this is the queue to which a consumer subscribes to
%% receive remote rablication messages. It may be more
%% sensible to put this in the `consumer' structure above if
%% we want to be the sink for many sources
{sink_queue, <<"remote_cluster">>}
]}
].