[rabbitmq-discuss] Stomp, subscriptions, and forward slashes

Brennan Sellner bsellner at seegrid.com
Sat Nov 2 22:04:41 GMT 2013


Hi everyone,

I'm currently in the process of using the web-stomp plugin to add
messaging to the browser to our existing RabbitMQ-linked system.  I've
run into a bit of a snag, however: long before we even contemplated
STOMP, we started including forward slashes in our exchange names (e.g.
robot/hardware/laser or server/chat).

This worked well across a variety of AMQP clients, but is wreaking havoc
with STOMP, since a subscription for all messages on the server/chat
exchange now looks like:

  client.subscribe ( '/exchange/server/chat/#', on_chat_msg );

This fails, with Rabbit complaining thusly (presumably due to the extra
/ and the resulting ambiguity):

=ERROR REPORT==== 2-Nov-2013::17:56:13 ===
STOMP error frame sent:
Message: "Invalid destination"
Detail: "'/server/chat/#' is not a valid exchange destination\n"
Server private detail: none

I'm able to get everything working if I omit the forward slash in the
exchange name.  However, I'd prefer to not have to make a system-wide
breaking change to our exchange names just to add another client.

Is there any way to escape the slash in the exchange name when
subscribing via web-stomp?  I've blindly tried a few options (i.e. '\\/'
or '%47'), but with no luck.  http://www.rabbitmq.com/stomp.html
indicates that the / should be replaced by %47 (and decoded on the far
end?), but I haven't seen any evidence of that occurring.

Any thoughts?

Thanks,

-Brennan

My apologies for the below:

Email Confidentiality Notice

The information contained in this transmission is confidential, proprietary or privileged and may be subject to protection under the law. This message is intended for the sole use of the individual or entity to whom it's addressed. If you are not the intended recipient, you are notified that any use, distribution or copying of the message is strictly prohibited and may subject you to criminal or civil penalties. If you received this transmission in error, please contact the sender immediately by replying to this email and delete the material from any computer.


More information about the rabbitmq-discuss mailing list