{deps, [
{aliyun_amqp, {git, "https://github.com/Naupio/aliyun_amqp.git", {tag, "0.1.1"} }}
]}.
edit the ./config/sys.config file
[
%% use your datas to replace the following values
{aliyun_amqp, [
{resource_owner_id, "1979843765064456"},
{access_key_id, "VSAsIVkiohunPUa"},
{secrect_key, "1979843765064456"},
{host, "1979843765064456.mq-amqp.cn-hangzhou-a.aliyuncs.com"}
]}
].
The following VALUES like aliyun-amqp-host ResourceOwnerId, AccessKeyId and SecrectKey are mock data, please use your owner value to replace it.
-module(connect_module)
-include_lib("amqp_client/include/amqp_client.hrl").
connect_aliyun_amqp() ->
VirtualHost = <<"your_amqp_virtual_host">>,
aliyun_amqp:connect_aliyun_amqp(#amqp_params_network{virtual_host = VirtualHost}).
main() ->
connect_aliyun_amqp().