Open samangh opened 5 years ago
Any thoughts on this?
When using the autobahn, how does one set a custom Option when registering an RPC end point?
This is not exposed in Autobahn currently.
What router are you using?
I'm using a fork of https://github.com/darrenjs/wampcc. I'm implementing some additional functionality by using the Options
element, as specified in the WAMP implementation.
The extensibility section in the paragraph https://wamp-proto.org/_static/gen/wamp_latest_ietf.html#rfc.section.6.1 relates to the WAMP community extending the protocol itself - it is not about user extensibility.
User extensibility - aka "custom attributes" or "implementation specific attributes" - is not in the spec, but discussed here: https://github.com/wamp-proto/wamp-proto/issues/345
Thus, the first thing is to nail consensus on above issue on the WAMP spec adding x_
based custom attributes as an advanced feature to the WAMP spec.
When that is done, we need implementation .. and your PR #1216 is essentially what needs to be done here (it must then be reworked to use x_
attributes - not a custom dict).
An important note is https://github.com/wamp-proto/wamp-proto/issues/345#issuecomment-454850745 : I fully agree with @meejah : it would be good to have use cases (the "why?" from a user perspective) described. This ensures that we actually cover the goals when defining the feature in the spec ..
When using the autobahn, how does one set a custom Option when registering an RPC end point?
The RegisterOptions object throws an exception when using an options that is not specified:
https://github.com/crossbario/autobahn-python/blob/fe70ceebe04849470b0c81b26ff6e65e709b0d33/autobahn/wamp/types.py#L930-L935
Section 6.1 of the WAMP specification specifies that if an option is not understood by an implementation then it must be ignored. My understanding is that this means that that the client should transmit the option to the router but not otherwise act on it.