crossbario / crossbario/autobahn-python
Support custom WAMP message attibutes
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2.5k
- Forks
- 768
- PR merge metrics
- No merged PRs in 30d
Description
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:
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.
6.1 Extensibility
Some WAMP messages contain
Options|dictorDetails|dictelements. This allows for future extensibility and implementations that only provide subsets of functionality by ignoring unimplemented attributes. Keys inOptionsandDetailsMUST be of type string and MUST match the regular expression[a-z][a-z0-9_]{2,}for WAMP predefined keys. Implementations MAY use implementation-specific keys that MUST match the regular expression [a-z0-9]{3,}. Attributes unknown to an implementation MUST be ignored.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at autobahn/wamp/types.py around lines 930-935, where RegisterOptions rejects unspecified options, and read section 6.1 of the linked WAMP specification. Trace registration of an RPC endpoint and verify that an implementation-specific option can be accepted and handled according to the specification without the current exception.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100