Add Support for STOMP 1.0
Closed this issue · 8 comments
1.0 is still the most popular version of the spec, and supporting seems to require few changes:
- Allow accept-version to be overridden
- Make subscription-id optional
With the change that closed #2, accept-version can now be changed or omitted. I'm not sure I want to make subscription-id optional though, because the STOMP semantics become unclear in that case. If that's OK with you, please let me know; otherwise, could you sketch out how you would like the optionality of the subscription-id to be incorporated into the library's API?
I think it is clear that it is optional in STOMP 1.0 [1]:
"You can also specify an id header which can then later on be used to UNSUBSCRIBE from the specific subscription as you may end up with overlapping subscriptions using selectors with the same destination"
[1] http://stomp.github.io/stomp-specification-1.0.html#frame-SUBSCRIBE
I'd suggest making #f the default value of subscription-id and not sending id when subscription-id equals #f, but you are certainly more familiar with the idioms in Racket than me.
OK, fair enough. Done :)
I guess you've missed changing the method signatures in session.rkt, didn't you?
I don't think so - it should all be there. Is something not working?
The default values are not defined, unless you didn't take that part of my suggestion.
There are no defaults - you have to explicitly supply #f if you want to
avoid using subscription IDs.
Thanks!