1[
2
3
4 %% ----------------------------------------------------------------------------
5 %% Advanced Erlang Networking/Clustering Options.
6 %%
7 %% See https://www.rabbitmq.com/clustering.html for details
8 %% ----------------------------------------------------------------------------
9 %% Sets the net_kernel tick time.
10 %% Please see http://erlang.org/doc/man/kernel_app.html and
11 %% https://www.rabbitmq.com/nettick.html for further details.
12 %%
13 %% {kernel, [{net_ticktime, 60}]},
14 %% ----------------------------------------------------------------------------
15 %% RabbitMQ Shovel Plugin
16 %%
17 %% See https://www.rabbitmq.com/shovel.html for details
18 %% ----------------------------------------------------------------------------
19
20 {rabbitmq_shovel,
21  [{shovels,
22    [%% A named shovel worker.
23     %% {my_first_shovel,
24     %%  [
25
26     %% List the source broker(s) from which to consume.
27     %%
28     %%   {sources,
29     %%    [%% URI(s) and pre-declarations for all source broker(s).
30     %%     {brokers, ["amqp://user:password@host.domain/my_vhost"]},
31     %%     {declarations, []}
32     %%    ]},
33
34     %% List the destination broker(s) to publish to.
35     %%   {destinations,
36     %%    [%% A singular version of the 'brokers' element.
37     %%     {broker, "amqp://"},
38     %%     {declarations, []}
39     %%    ]},
40
41     %% Name of the queue to shovel messages from.
42     %%
43     %% {queue, <<"your-queue-name-goes-here">>},
44
45     %% Optional prefetch count.
46     %%
47     %% {prefetch_count, 10},
48
49     %% when to acknowledge messages:
50     %% - no_ack: never (auto)
51     %% - on_publish: after each message is republished
52     %% - on_confirm: when the destination broker confirms receipt
53     %%
54     %% {ack_mode, on_confirm},
55
56     %% Overwrite fields of the outbound basic.publish.
57     %%
58     %% {publish_fields, [{exchange,    <<"my_exchange">>},
59     %%                   {routing_key, <<"from_shovel">>}]},
60
61     %% Static list of basic.properties to set on re-publication.
62     %%
63     %% {publish_properties, [{delivery_mode, 2}]},
64
65     %% The number of seconds to wait before attempting to
66     %% reconnect in the event of a connection failure.
67     %%
68     %% {reconnect_delay, 2.5}
69
70     %% ]} %% End of my_first_shovel
71    ]}
72   %% Rather than specifying some values per-shovel, you can specify
73   %% them for all shovels here.
74   %%
75   %% {defaults, [{prefetch_count,     0},
76   %%             {ack_mode,           on_confirm},
77   %%             {publish_fields,     []},
78   %%             {publish_properties, [{delivery_mode, 2}]},
79   %%             {reconnect_delay,    2.5}]}
80  ]},
81
82  {rabbitmq_auth_backend_ldap, [
83    %%
84    %% Authorisation
85    %% =============
86    %%
87
88    %% The LDAP plugin can perform a variety of queries against your
89    %% LDAP server to determine questions of authorisation. See
90    %% https://www.rabbitmq.com/ldap.html#authorisation for more
91    %% information.
92
93    %% Set the query to use when determining vhost access
94    %%
95    %% {vhost_access_query, {in_group,
96    %%                       "ou=${vhost}-users,ou=vhosts,dc=example,dc=com"}},
97
98    %% Set the query to use when determining resource (e.g., queue) access
99    %%
100    %% {resource_access_query, {constant, true}},
101
102    %% Set queries to determine which tags a user has
103    %%
104    %% {tag_queries, []}
105  ]}
106].
107
108
109
110