AMQPHelpers.RPC (AMQP Helpers v1.6.0)
View SourceA remote procedure call implementation.
This module provide a helper function which implements the RPC pattern using the Direct Reply-to. This allows a client to send a request and receive a response synchronously, without having to manage any response queue.
Summary
Functions
Executes a remote procedure call.
Executes a remote procedure call without linking to the calling process.
Functions
@spec call( module(), AMQP.Connection.t(), AMQP.Basic.exchange(), AMQP.Basic.routing_key(), AMQP.Basic.payload(), keyword() ) :: {:ok, term()} | {:error, term()} | no_return()
Executes a remote procedure call.
This function sends the given messages and waits for a response using Direct Reply-to.
This function uses a Task internally to wait for responses. This means
all the caveats and OTP compatibility Task issues apply here too. Check
call_nolink/7 for more information.
@spec call_nolink( module(), Supervisor.supervisor(), AMQP.Connection.t(), AMQP.Basic.exchange(), AMQP.Basic.routing_key(), AMQP.Basic.payload(), keyword() ) :: {:ok, term()} | {:error, term()} | no_return()
Executes a remote procedure call without linking to the calling process.
Like call/6 but it does not link the waiting process to the calling process.
Check Task.Supervisor for more information.