Feature/pattern based subscriptions #19
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Implement pattern-based subscriptions.
Unfortunately, the API surface for subscribing must be changed to facilitate this and future features. Primarily the user must be able to pass options to enable features. For this particular feature it is also very helpful to have access to the event details to determine the exact topic to which the event was published. The broker provides a lot of other useful information in the details object as well.
To facilitate easy addition of options which may be implemented in the future there is a
SubscribeOptionstype which acts as a builder for theWampDict. I have additionally added theClonederivation to theArgenum to enable this functionality without requiring the user to worry about ownership of references too much. Some validation could probably be added to prevent some user error here, but I feel like this is decent place to start.I think building upon the changes required to enable other parts of the advanced profile for WAMP should make it easier to implement progressive RPC calls in the future.