[rabbitmq-discuss] RabbitMQ Synchronous Client Example?

Ben Hood 0x6e6562 at gmail.com
Sun Jul 19 21:29:09 BST 2009


Lynton,

On Sun, Jul 19, 2009 at 3:27 PM, Lynton
Grice<lynton.grice at logosworld.com> wrote:
> Can you explain to me how it would work if I had a PYTHON consumer (or
> other) that would take the message off the queue....process it and send it
> back? What do I send it back to?  I assume it would all be on
> "correlationid".....
..
> So as I mentioned above I want to send the message to a Python consumer, let
> it process the message and send the response back....

The client sets both the name of it's private queue in the reply-to
field and and creates a unique correlation id for each RPC. So all the
"server" has to do when responding is to a) set the routing key of the
message to the value of the reply-to field it received on the inbound
message and b) copy the correlation id from the inbound message to the
resulting outbound message. There are examples of how to do this in
the Erlang, Java and .NET clients - just look for modules/classes
called RpcServer.

HTH,

Ben




More information about the rabbitmq-discuss mailing list