[rabbitmq-discuss] Synchronous Message Response
Emile Joubert
emile at rabbitmq.com
Tue May 10 12:40:42 BST 2011
Hi,
On 10/05/11 02:40, mp wrote:
>
> var client = new SimpleRpcClient(model, queueName)
The first thing to check is whether you need RPC. It is often possible
and better to design your system in a way that the same client does not
need the server response immediately.
If you do need RPC then the comments in the SimpleRpcClient and
SimpleRpcServer classes provide guidance for their use.
> byte[] response;//...
>
> //how do I send a response?
In the server, if the request requires a response then this is provided
by the return value of the HandleSimpleCall() method. If the message
requires no response then HandleSimpleCast() is called instead and no
response is sent.
> client side:
>
> //what does the client do to retrieve the ACK and RESPONSE.
Messages from the server are acknowledged internally in the
SimpleRpcClient implementation. The server response is available as the
return value of the Call() method.
-Emile
More information about the rabbitmq-discuss
mailing list