ex_aliyun_amqp v0.1.2 ExAliyunAMQP.Connection View Source
Simple wrapper for AMQP.Connection
within Alibaba AMQP product's authorization.
Link to this section Summary
Functions
Closes an open Connection.
Similar as AMQP.Connection.open/2
, but there are some options are different.
Prepare options of connection with Alibaba AMQP product's authorization, please see options of open/2
for details.
Link to this section Functions
close(connection)
View Sourceclose(AMQP.Connection.t()) :: :ok | {:error, any()}
Closes an open Connection.
open(options \\ [], name \\ :undefined)
View Sourceopen(keyword(), String.t() | :undefined) :: {:ok, AMQP.Connection.t()} | {:error, atom()} | {:error, any()}
Similar as AMQP.Connection.open/2
, but there are some options are different.
Options
:access_id
- The access_id of Alibaba resource access management for AMQP product, it is instead ofusername
option (required);:secret_key
- The secret_key of Alibaba resource access management for AMQP product, it is instead ofpassword
option (required);:owner_id
- The id of Alibaba cloud account (required);:host
- The hostname of the Alibaba AMQP product broker (required);:virtual_host
- The name of a virtual host in the Alibaba AMQP product broker (required);:port
- The port the broker is listening on (defaults to5672
);:channel_max
- The channel_max handshake parameter (defaults to0
);:frame_max
- The frame_max handshake parameter (defaults to0
);:heartbeat
- The hearbeat interval in seconds (defaults to10
);:connection_timeout
- The connection timeout in milliseconds (defaults to50000
);:ssl_options
- Enable SSL by setting the location to cert files (defaults to:none
);:client_properties
- A list of extra client properties to be sent to the server, defaults to[]
;:socket_options
- Extra socket options. These are appended to the default options. See http://www.erlang.org/doc/man/inet.html#setopts-2 and http://www.erlang.org/doc/man/gen_tcp.html#connect-4 for descriptions of the available options.
Prepare options of connection with Alibaba AMQP product's authorization, please see options of open/2
for details.
The :access_id
, :secret_key
, :owner_id
option are not AMQP connection starndard options, they are used to construct
the required :username
and :password
option, to keep the returned options may used in other AMQP client initialization
(e.g. BroadwayRabbitMQ.AmqpClient.init/1
), these 3 options are not in the returned.