[rabbitmq-discuss] Getting the routing key from connection (web stomp)
mcintoshj at gmail.com
Fri Oct 25 17:24:59 BST 2013
A few other thoughts on your topology. Take a strong look at the routing
keys and exchanges and queues. Rabbit's really designed to be a
"asynchronous" messaging platform. I'm not sure though I understand what
you mean by clients as well. Is the system doing the request to the stomp
API your client? And it's also the client that wants to consume from the
queue in an RPC kinda mechanism? What you could do in this case, would be
startup a consumer in your process with a generated random value (e.g.
machine name and datetime), the WEB STOMP publishes to a direct exchange
with a message that includes a header "Return data to queue <randomvalue>".
Your server side processing receives that message, processes it, reads
that header and publishes a message to that queue. Then your consumer
"thread" after your publisher is ready can just deliver the resulting
message, and auto-delete the queue. Just one possibility.
On Fri, Oct 11, 2013 at 5:49 AM, Emile Joubert <emile at rabbitmq.com> wrote:
> Hi Magnus,
> Apologies for the delayed response to your query.
> On 28/09/13 22:18, Magnus Andersson wrote:
> > I need to get a handle on the routing key for the generated temporary
> If you need the name of a temporary queue then that is normally a sign
> that you should name the queue yourself instead of relying on a
> server-generated name.
> > 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?*
> Opening a connection does not involve a routing key.
> > 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.
> If you want to address clients individually then the clients should
> maintain separate individual subscriptions for that line of
> communication, possibly not involving temporary queue names.
> > The documentation is very scarce on Web Stomp and I'm new to RabbitMQ
> > and not particularly Erlang proficient. So I need some pointers.
> There are some examples that illustrate use of the plugin:
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the rabbitmq-discuss