Cause | Exit reason |
Any reason, where Code would have been 200 otherwise | normal |
User application calls amqp_connection:close/3 | close_reason(app_initiated_close) |
Server closes connection (hard error) | close_reason(server_initiated_close) |
Server misbehaved (did not follow protocol) | close_reason(server_misbehaved) |
AMQP client internal error - usually caused by a channel exiting with an unusual reason. This is usually accompanied by a more detailed error log from the channel | close_reason(internal_error) |
Other error | (various error reasons, causing more detailed logging) |
amqp_adapter_info() = #amqp_adapter_info{}
amqp_params_direct() = #amqp_params_direct{}
As defined in amqp_client.hrl. It contains the following fields:
amqp_params_network() = #amqp_params_network{}
As defined in amqp_client.hrl. It contains the following fields:
amqp_reason(Type) = {Type, Code, Text}
close_reason(Type) = {shutdown, amqp_reason(Type)}
close/1 | Closes the channel, invokes close(Channel, 200, <<"Goodbye">>). |
close/2 | Closes the channel, using the supplied Timeout value. |
close/3 | Closes the AMQP connection, allowing the caller to set the reply code and text. |
close/4 | Closes the AMQP connection, allowing the caller to set the reply code and text, as well as a timeout for the operation, after which the connection will be abruptly terminated. |
connection_name/1 | Returns user specified connection name from client properties. |
error_atom/1 | Returns a descriptive atom corresponding to the given AMQP error code. |
info/2 | Returns information about the connection, as specified by the Items list. |
info_keys/0 | Returns a list of atoms that can be used in conjunction with info/2. |
info_keys/1 | Returns a list of atoms that can be used in conjunction with info/2. |
open_channel/1 | Invokes open_channel(ConnectionPid, none, {amqp_selective_consumer, []}). |
open_channel/2 | Invokes open_channel(ConnectionPid, none, Consumer). |
open_channel/3 | Opens an AMQP channel. |
register_blocked_handler/2 | |
socket_adapter_info/2 | Takes a socket and a protocol, returns an #amqp_adapter_info{} based on the socket for the protocol given. |
start/1 | same as start(Params, undefined) |
start/2 | Starts a connection to an AMQP server. |
update_secret/3 |
close(ConnectionPid) -> ok | Error
Closes the channel, invokes close(Channel, 200, <<"Goodbye">>).
close(ConnectionPid, Timeout) -> ok | Error
Closes the channel, using the supplied Timeout value.
close(ConnectionPid, Code, Text) -> ok | closing
Closes the AMQP connection, allowing the caller to set the reply code and text.
close(ConnectionPid, Code, Text, Timeout) -> ok | closing
Closes the AMQP connection, allowing the caller to set the reply code and text, as well as a timeout for the operation, after which the connection will be abruptly terminated.
connection_name(ConnectionPid) -> ConnectionName
Returns user specified connection name from client properties
error_atom(Code) -> atom()
Returns a descriptive atom corresponding to the given AMQP error code.
info(ConnectionPid, Items) -> ResultList
Returns information about the connection, as specified by the Items list. Item may be any atom returned by info_keys/1:
info_keys() -> Items
Returns a list of atoms that can be used in conjunction with info/2. These are general info keys, which can be used in any type of connection. Other info keys may exist for a specific type. To get the full list of atoms that can be used for a certain connection, use info_keys/1.
info_keys(ConnectionPid) -> Items
Returns a list of atoms that can be used in conjunction with info/2. Note that the list differs from a type of connection to another (network vs. direct). Use info_keys/0 to get a list of info keys that can be used for any connection.
open_channel(ConnectionPid) -> any()
Invokes open_channel(ConnectionPid, none, {amqp_selective_consumer, []}). Opens a channel without having to specify a channel number. This uses the default consumer implementation.
open_channel(ConnectionPid, Consumer) -> any()
Invokes open_channel(ConnectionPid, none, Consumer). Opens a channel without having to specify a channel number.
open_channel(ConnectionPid, ChannelNumber, Consumer) -> Result
Opens an AMQP channel.
Opens a channel, using a proposed channel number and a specific consumer
implementation.
ConsumerModule must implement the amqp_gen_consumer behaviour. ConsumerArgs
is passed as parameter to ConsumerModule:init/1.
This function assumes that an AMQP connection (networked or direct)
has already been successfully established.
ChannelNumber must be less than or equal to the negotiated
max_channel value, or less than or equal to ?MAX_CHANNEL_NUMBER
(65535) if the negotiated max_channel value is 0.
In the direct connection, max_channel is always 0.
register_blocked_handler(ConnectionPid, BlockHandler) -> any()
socket_adapter_info(Sock, Protocol) -> any()
Takes a socket and a protocol, returns an #amqp_adapter_info{} based on the socket for the protocol given.
start(AmqpParams::Params) -> {ok, Connection} | {error, Error}
same as start(Params, undefined)
start(AmqpParams::Params, ConnName::ConnectionName) -> {ok, Connection} | {error, Error}
Starts a connection to an AMQP server. Use network params to connect to a remote AMQP server or direct params for a direct connection to a RabbitMQ server, assuming that the server is running in the same process space. If the port is set to 'undefined', the default ports will be selected depending on whether this is a normal or an SSL connection. If ConnectionName is binary - it will be added to client_properties as user specified connection name.
update_secret(ConnectionPid::pid(), NewSecret::term(), Reason::binary()) -> {ok, rabbit_types:auth_user()} | {refused, string(), [any()]} | {error, any()}
Generated by EDoc