Module amqp_rpc_client

This module allows the simple execution of an asynchronous RPC over AMQP.

Behaviours: gen_server.

Description

This module allows the simple execution of an asynchronous RPC over AMQP. It frees a client programmer of the necessary having to AMQP plumbing. Note that the this module does not handle any data encoding, so it is up to the caller to marshall and unmarshall message payloads accordingly.

Function Index

call/2Invokes an RPC.
start/2Starts a new RPC client instance that sends requests to a specified queue.
start_link/2Starts, and links to, a new RPC client instance that sends requests to a specified queue.
stop/1Stops an exisiting RPC client.

Function Details

call/2

call(RpcClient, Payload) -> ok

Invokes an RPC. Note the caller of this function is responsible for encoding the request and decoding the response.

start/2

start(Connection, Queue) -> RpcClient

Starts a new RPC client instance that sends requests to a specified queue. This function returns the pid of the RPC client process that can be used to invoke RPCs and stop the client.

start_link/2

start_link(Connection, Queue) -> RpcClient

Starts, and links to, a new RPC client instance that sends requests to a specified queue. This function returns the pid of the RPC client process that can be used to invoke RPCs and stop the client.

stop/1

stop(Pid::RpcClient) -> ok

Stops an exisiting RPC client.


Generated by EDoc, May 25 2017, 11:58:31.