[rabbitmq-discuss] RabbitMQ STOMP Adapter - How to get the RPC reply messages?
tiago.alves at muzzley.com
Thu Sep 27 11:55:00 BST 2012
Thank you for the help, Emile.
Our server-side client is an AMQP client in node.js (node-amqp) that
connects directly to RabbitMQ. That's why I've mentioned that we have a
"replyTo" queue and not a "reply-to" in that client. (We do send the
message with a "reply-to" header in the STOMP client)
We've made progress and are now able to send back the reply from our
server-side client. We figured out that a reply queue such as
"/reply-queue/amq.gen-w2jykNGp4DNDBADm3C4Cdx" simply corresponds to the
RabbitMQ queue "amq.gen-w2jykNGp4DNDBADm3C4Cdx" in the default exchange.
Thus, we're now removing the "/reply-queue/" part of the replyTo header,
and using the result as the destination queue for the response. We're
assuming that this should/could be done transparently by an AMQP client
with the notion that RPC messages from STOMP clients will need this replyTo
string manipulation. Is this correct?
More details about a working solution can be found in this Stack Overflow
On Wed, Sep 26, 2012 at 11:08 AM, Emile Joubert <emile at rabbitmq.com> wrote:
> On 24/09/12 15:14, Tiago Alves wrote:
> > (example: replyTo: '/reply-queue/amq.gen-w2jykNGp4DNDBADm3C4Cdx'). Still
> That not a recognised header instead of "replyTo" it should be "reply-to".
> > in my server-side client, I can reply to the message just by publishing
> > a message to "/reply-queue/amq.gen-w2jykNGp4DNDBADm3C4Cdx".
> Correct, assuming your server-side uses STOMP.
> > So, how do I subscribe to the reply-to queue? How can I get the results
> > of RPC calls?
> You don't have to - the subscription is made for you automatically when
> you use the "reply-to" header.
> I would suggest that you verify this by hand first and only then move on
> to confirming that it also works with your websockets library.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the rabbitmq-discuss