[rabbitmq-discuss] RabbitMQ Synchronous Client Example?

Lynton Grice lynton.grice at logosworld.com
Sun Jul 19 08:59:06 BST 2009


Hi Alexis,

Ideally I would want an AMQP client in Erlang code for the RPC pattern....I
will check it out, thanks for the help ;-)

Lynton

-----Original Message-----
From: Alexis Richardson [mailto:alexis.richardson at gmail.com] 
Sent: 18 July 2009 08:48 PM
To: Lynton Grice
Cc: rabbitmq-discuss at lists.rabbitmq.com
Subject: Re: [rabbitmq-discuss] RabbitMQ Synchronous Client Example?

Lynton

There should be some examples of the RPC pattern in the source and
docs.  At least for Java and .NET.  You could also look at some of the
python and ruby synchronous clients.  None of them use HTTP though.
They all use AMQP (iirc).

alexis


On Sat, Jul 18, 2009 at 3:58 PM, Lynton
Grice<lynton.grice at logosworld.com> wrote:
> Hi guys,
>
>
>
> Quick one.....I have the following scenario:
>
>
>
> Client sends message -> Mochiweb HTTP Server -> AMQP Erlang client ->
> RabbitMQ -> PYTHON consumer
>
>
>
> Obviously the scenario suits ASYNCHRONOUS processing very well.......but
now
> I want to handle SYNCHRONOUS as well....?
>
>
>
> So what I would like is a SYNCHRONOUS scenario whereby the message goes
from
> the client -> Mochiweb HTTP server -> then to the AMQP Erlang client, this
> then sends the message to RabbitMQ and blocks for a RESPONSE (waits for
> return message).....then the Python consumer picks up the
> message....processes it and sends the response to a "RESPONSE
queue".....the
> code then receives this response message (via some type of
"correlationID"?)
> and sends it back to the calling client.
>
>
>
> So basically how are synchronous scenarios handles in RabbitMQ? Does
anyone
> have any example code in Erlang (or other) that shows how to process a
> message with ID "123" in RabbitMQ and put the result of message "123" into
> some other response queue..
>
>
>
> Well I suppose when I speak of queues above maybe it should be
> "exchange"....maybe with a "routing_key"? The "routing_key" could be an
> internal "correlationID" of sorts?
>
>
>
> So essentially the process will seem SYNCHRONOUS from that calling client
> but will be ASYNCHRONOUS in the "internals"...
>
>
>
> Any ideas?
>
>
>
> Thanks for the help ;-)
>
>
>
> Lynton
>
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> http://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>
>





More information about the rabbitmq-discuss mailing list