Module amqp_director

Data Types

client_option()

client_option() = {app_id, binary()} | {queue_definitions, [queue_definition()]} | {reply_queue, binary()} | {no_ack, boolean()}

connection_option()

connection_option() = {host, binary()} | {port, non_neg_integer()} | {username, binary()} | {password, binary()} | {virtual_host, binary()}

content_type()

content_type() = binary()

handler()

handler() = fun((Payload::binary(), ContentType::binary(), Type::binary()) -> handler_return_type())

handler_return_type()

handler_return_type() = {reply, Payload::binary(), content_type()} | reject | reject_no_requeue | {reject_dump_msg, binary()} | ack

parsed_connection_options()

parsed_connection_options() = #amqp_params_network{}

pull_client_option()

pull_client_option() = {app_id, binary()} | {queue_definitions, [queue_definition()]}

queue_definition()

queue_definition() = #'queue.declare'{} | #'queue.bind'{} | #'exchange.declare'{}

server_option()

server_option() = {host, binary()} | {port, non_neg_integer()} | {username, binary()} | {password, binary()} | {virtual_host, binary()}

Function Index

ad_client_child_spec/3 Construct a child specification for an AMQP RPC Server.
client_child_spec/3(Deprecated.)
mk_app_id/1Construct an application Id for this node based on a RegName atom.
parse_connection_parameters/1 Parses the connection parameters.
server_child_spec/5 Construct a child specification for an AMQP RPC Server.
sp_client_child_spec/3 Creates a child specification for an AMQP RPC pull client.

Function Details

ad_client_child_spec/3

ad_client_child_spec(Name::atom(), ConnInfo::parsed_connection_options(), Config::[client_option()]) -> supervisor:child_spec()

Construct a child specification for an AMQP RPC Server. This specification allows for RPC clients to be nested under any supervisor in the application using AmqpDirector. The RPC client can perform queue initialization. It will also create a reply queue to consume replies on.

client_child_spec/3

client_child_spec(Name, ConnInfo, Config) -> any()

This function is deprecated: Please use ad_client_child_spec/3 instead

mk_app_id/1

mk_app_id(RegName::atom()) -> binary()

Construct an application Id for this node based on a RegName atom

parse_connection_parameters/1

parse_connection_parameters(Props::[connection_option()]) -> parsed_connection_options()

Parses the connection parameters. This function takes the conneciton parameters in form of a proplist and outputs them in format used by other functions.

server_child_spec/5

server_child_spec(Name::atom(), Fun::handler(), ConnInfo::parsed_connection_options(), ServersCount::pos_integer(), Config::[server_option()]) -> supervisor:child_spec()

Construct a child specification for an AMQP RPC Server. This specification allows for RPC servers to be nested under any supervisor in the application using AmqpDirector. The RPC Server will initialize the queues it is instructed to and will then consume messages on the queue specified. The handler function will be called to handle each request.

sp_client_child_spec/3

sp_client_child_spec(Name::atom(), ConnInfo::parsed_connection_options(), Config::[pull_client_option()]) -> supervisor:child_spec()

Creates a child specification for an AMQP RPC pull client. This specification allows for RPC clients to be nested under any supervisor in the application using AmqpDirector. The pull client uses the Synchronous Pull (#basic.get{}) over AMQP.


Generated by EDoc