Module amqp_rpc_server

This is a utility module that is used to expose an arbitrary function via an asynchronous RPC over AMQP mechanism.

Behaviours: gen_server.

Description

This is a utility module that is used to expose an arbitrary function via an asynchronous RPC over AMQP mechanism. It frees the implementor of a simple function from having to plumb this into AMQP. Note that the RPC server does not handle any data encoding, so it is up to the callback function to marshall and unmarshall message payloads accordingly.

Function Index

start/3Starts a new RPC server instance that receives requests via a specified queue and dispatches them to a specified handler function.
start_link/3Starts, and links to, a new RPC server instance that receives requests via a specified queue and dispatches them to a specified handler function.
stop/1Stops an exisiting RPC server.

Function Details

start/3

start(Connection, Queue, Fun::RpcHandler) -> RpcServer

Starts a new RPC server instance that receives requests via a specified queue and dispatches them to a specified handler function. This function returns the pid of the RPC server that can be used to stop the server.

start_link/3

start_link(Connection, Queue, Fun::RpcHandler) -> RpcServer

Starts, and links to, a new RPC server instance that receives requests via a specified queue and dispatches them to a specified handler function. This function returns the pid of the RPC server that can be used to stop the server.

stop/1

stop(Pid::RpcServer) -> ok

Stops an exisiting RPC server.


Generated by EDoc, Apr 2 2014, 16:05:56.