[rabbitmq-discuss] Getting the routing key from connection (web stomp)

Magnus Andersson magnus.andersson at mollyware.se
Sat Sep 28 22:18:15 BST 2013


Hi

I need to get a handle on the routing key for the generated temporary queue 
when using web stomp. I can't get that from the JavaScript side.

My desired scenario for my event driven app.
1) Browser client opens a websocket connection to rabbitmq web stomp
2) When calling client.connect, the routing key is made available (example: 
amq.gen-oQVllULAASDvZdXsxFADHg). *Not working today?*
3) The client can the send a HTTP REST request to our API with a command. 
Attaches the routing key from the previous step.
4) The request returns immediately after the message is delivered processed 
and placed on a queue.
5) After the server side processing is done (multiple systems involved), 
the routing key is finally used and the result is published back to the 
browser

I do not wish to send messages to the server from the browser over stomp, 
since we already have our REST API I want to use that. I already have 
strong authentication implemented there.

There is a fan-out exchange that all clients subscribe to. But I mostly 
want to send messages to one dedicated client at a time.

The documentation is very scarce on Web Stomp and I'm new to RabbitMQ and 
not particularly Erlang proficient. So I need some pointers. 

Also, if there is a smarter way to do it, please do tell.

Best regards and thanks in advance!
/Magnus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20130928/750db849/attachment.htm>


More information about the rabbitmq-discuss mailing list