Behaviours: gen_server.
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.
The original RabbitMQ code by VMware has been altered to handle certain kinds of errors and to fit into a supervisor tree of a hosting application. Thus the intention is to embed server workers like these in the host application supervisor tree.start_link/3 | Starts a new RPC server instance that receives requests via a specified queue and dispatches them to a specified handler function. |
start_link(ConnectionRef, Config, RpcHandler) -> {ok, pid()}
Starts a new RPC server instance that receives requests via a
specified queue and dispatches them to a specified handler function. You
need to supply a connection reference to a connection_mgr
process as well
as the queue you want to listen on. Since the queue will be created if it
does not already exist (and checked if it does), you also need to supply
queue arguments. Currently in the RabbitMQ native format. There is no provision
for marking queues as durable at the moment.
Generated by EDoc