[NETCONF-351] Websocket implementation doesn't support unsubscribe for notifications Created: 23/Feb/17 Updated: 04/May/20 |
|
| Status: | Confirmed |
| Project: | netconf |
| Component/s: | restconf-nb |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Medium |
| Reporter: | Ritu Sood | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Operating System: All |
||
| Issue Links: |
|
||||||||
| External issue ID: | 7845 | ||||||||
| Description |
|
Current websocket mechanism has support for subscription for notifications but doesn't support unsubscribe for notifications. |
| Comments |
| Comment by Ivan Hrasko [ 28/Feb/17 ] |
|
Do you use this setup https://wiki.opendaylight.org/view/OpenDaylight_Controller:MD-SAL:Restconf:Change_event_notification_subscription ? |
| Comment by Robert Varga [ 01/Jun/17 ] |
|
What we need to do here is to expose a new RPC to destroy a dynamically created notification stream. The RPC should live in sal-restconf-connector/src/main/yang/opendaylight-md-sal-remote.yang and should tear down the stream and its listener. |
| Comment by Robert Varga [ 01/Jun/17 ] |
|
Another, possibly better alternative is to split the act of defining the notification stream and the act of subscribing the stream. From requirements perspective it is completely fine to create-data-change-event-subscription to just set up a blank stream (which does not actually listen for data, but knows that the instance identifier is) and then start a dedicated DataTreeChangeListener when a websocket request to listen comes in – hence each websocket client will have its own DataTreeChangeListener. This also means that such a stream does not have the RFC5277 replaySupport capability (e.g. replaySupport is always false). As for lifecycle interactions, if a stream gets destroyed, we want all existing clients to finish delivering their current notification and then disconnect them. This maps to destroying the DataTreeChangeListener once it has finished whatever its current sending to the websocket. |