1%% This Source Code Form is subject to the terms of the Mozilla Public
2%% License, v. 2.0. If a copy of the MPL was not distributed with this
3%% file, You can obtain one at https://mozilla.org/MPL/2.0/.
4%%
5%% Copyright (c) 2007-2021 VMware, Inc. or its affiliates.  All rights reserved.
6%%
7
8%% @private
9-module(amqp_client).
10
11-behaviour(application).
12
13-export([start/0]).
14-export([start/2, stop/1]).
15
16%%---------------------------------------------------------------------------
17%% Interface
18%%---------------------------------------------------------------------------
19
20start() ->
21    %% rabbit_common needs compiler and syntax_tools, see
22    %%
23    %%  * https://github.com/rabbitmq/rabbitmq-erlang-client/issues/72
24    %%  * https://github.com/rabbitmq/rabbitmq-common/pull/149
25    application:ensure_all_started(rabbit_common),
26    {ok, _} = application:ensure_all_started(amqp_client),
27    ok.
28
29%%---------------------------------------------------------------------------
30%% application callbacks
31%%---------------------------------------------------------------------------
32
33start(_StartType, _StartArgs) ->
34    amqp_sup:start_link().
35
36stop(_State) ->
37    ok.
38