benjaminws / stomp-js

Implementation of the STOMP protocol in node.js
BSD 3-Clause "New" or "Revised" License
87 stars 47 forks source link

Adding support for vhost host header (required in Stomp 1.1 protocol) #23

Closed thurmda closed 11 years ago

thurmda commented 11 years ago

We recently switched to using Vhosts to segment our queues and I need to use the host header defined in the Stomp 1.1 protocol.

http://stomp.github.com/stomp-specification-1.1.html#CONNECT_or_STOMP_Frame

I'm actually not that familiar with the Stomp changes for the 1.0 => 1.1 protocol shift. I'd be happy to add them too if you really care to support it. The vhost header was all I needed to get my project back on track after our change in queue management.

i.e. I am creating my client like this:

var client = new stomp.Stomp({
    port: 61613,
    host: 'rmq',
    vhost: 'MY_VIRTUAL_HOST_HEADER',
    debug: true,
});
benjaminws commented 11 years ago

I haven't implemented 1.1 support at all yet. I'd like to do it all at once, but alas. :disappointed:

I..really, I should finish this: https://github.com/benjaminws/stomp-js-new

If you want to help me get that one moving again, that'd be sweet. It's basically the same thing, revisited with a test driven approach. I started STOMP 1.1 implementation, but I have neglected to take the time to finish it. It's mostly done otherwise, sans SSL.

Anyway, thanks for your patch, I don't see any reason not to merge this in and bump the version.