crossbario / crossbario/autobahn-python

Support custom WAMP message attibutes

Open
#1,214 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement feature wamp
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:

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.

6.1 Extensibility

Some WAMP messages contain Options|dict or Details|dict elements. This allows for future extensibility and implementations that only provide subsets of functionality by ignoring unimplemented attributes. Keys in Options and Details MUST 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.