wamp_async icon indicating copy to clipboard operation
wamp_async copied to clipboard

Feature/pattern based subscriptions

Open NeoVance opened this issue 2 years ago • 0 comments

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 SubscribeOptions type which acts as a builder for the WampDict. I have additionally added the Clone derivation to the Arg enum 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.

NeoVance avatar May 21 '22 01:05 NeoVance