-
Notifications
You must be signed in to change notification settings - Fork 4k
Expand file tree
/
Copy pathrabbit_fifo_dlx_sup.erl
More file actions
37 lines (31 loc) · 1.23 KB
/
rabbit_fifo_dlx_sup.erl
File metadata and controls
37 lines (31 loc) · 1.23 KB
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
%% This Source Code Form is subject to the terms of the Mozilla Public
%% License, v. 2.0. If a copy of the MPL was not distributed with this
%% file, You can obtain one at https://mozilla.org/MPL/2.0/.
%%
%% Copyright (c) 2007-2026 Broadcom. All Rights Reserved. The term “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. All rights reserved.
-module(rabbit_fifo_dlx_sup).
-behaviour(supervisor).
-rabbit_boot_step(
{?MODULE,
[{description, "supervisor of quorum queue at-least-once dead-letter workers"},
{mfa, {rabbit_sup, start_supervisor_child, [?MODULE]}},
{requires, kernel_ready},
{enables, core_initialized}]}).
%% supervisor callback
-export([init/1]).
%% client API
-export([start_link/0]).
start_link() ->
supervisor:start_link({local, ?MODULE}, ?MODULE, []).
init([]) ->
rabbit_fifo_dlx_worker:init_ets(),
SupFlags = #{strategy => simple_one_for_one,
intensity => 100,
period => 1},
Worker = rabbit_fifo_dlx_worker,
ChildSpec = #{id => Worker,
start => {Worker, start_link, []},
type => worker,
restart => transient,
modules => [Worker]},
{ok, {SupFlags, [ChildSpec]}}.