-
Notifications
You must be signed in to change notification settings - Fork 586
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
wild card subscriptions don't work #1
Comments
yes, I did not implement wild card subscription as they're dependent on the Stomp broker you use (I suppose you're using ActiveMQ, right?) we could create a mapper function which returns a boolean if the frame.headers.destination matches the destination used when subscribing and loop on the subscriptions to find which ones match the destinations. Do you have another idea how you want to fix this? |
actually, I think we can support wildcard without much work. Stomp specified that when a client SUBSCRIBE to a destination and pass an id header, all messages received by the subscriber will have this id[1]. that.subscribe = function(destination, callback, headers) { When a message is received, we will check for this id instead of the destination header:
This only thing I am not sure is the uniqueness of the id. Interested to contribute? :) [1] http://activemq.apache.org/stomp/stomp10/specification.html#subscribe |
My reading of that would be that it must be per client. Otherwise the broker is forcing the client to know about all other clients, (or at least, choose an id that is required never to clash with any other client, current or future) Given that the client provides the ID, it must be safe to assume that the id is the id in the client system, not the id in the broker system. I'll get to this eventually (probably) but it won't be for at least a week, and my jsfu is barely beginning. |
Wildcard subscriptions support
closed by 394663d |
I'll see if I can fix this myself, but just so you know...
If I do..
client.subscribe("/topic/karlnet.>", onreceive);
Then the debug clearly shows that the messages are received, but the
var onreceive = subscriptions[frame.headers.destination];
if (onreceive) {
lines, look for an exact match, which isn't found.
The text was updated successfully, but these errors were encountered: