[rabbitmq-discuss] Synchronous Message Response
mp
mpxr at yahoo.com.au
Tue May 10 02:40:22 BST 2011
Hi,
I'm struggling with a simple concept of synchronous communication with
rabbitMQ, in terms of getting a response message back to the client.
I'm trying to work out how to send it and also what the client will need to do
to receive the message?
I have an exchange defined, I create a model, and queue, use .Call() and it
arrives in my "server". FYI syntax below is C#.NET 4.
client side:
model.ExchangeDeclare(ExchangeName, "direct");
var queueName = ch.QueueDeclare(queueId, false, false, false, null);
var client = new SimpleRpcClient(model, queueName)
var replyMessageBytes = client.Call(msgToSend);server side:
//similar setup like client side
var model = conn.CreateModel()
model.BasicGet(queueName, false);
ch.BasicAck(msg.DeliveryTag, false);
byte[] response; //... //how do I send a response?
client side:
//what does the client do to retrieve the ACK and RESPONSE.
I had a search of the mailing list archive and couldn't find a similar question
(Also sorry sent twice, because I sent before confirming my address in mailing
group, it was in my spam folder),
Thanks &
Regards
-mp
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20110509/4fafb85d/attachment.htm>
More information about the rabbitmq-discuss
mailing list