Skip to content

Describe process for subscription updates #132

Closed
@martinthomson

Description

@martinthomson

Any time a subscription needs to change, we signal that with the subscriptionchange event. Some of these cases won't be as a result of a break and it would be good to describe how a subscription is seamlessly updated.

I think that the process is simple:

  1. Determine that a subscription update is needed for any reason. This might be expiration of the subscription, or a desire to roll out the old encryption keys (see Force confidentiality and integrity protection (encryption) #55).
  2. Create a new subscription with the new parameters, while leaving the old subscription in place.
  3. Fire the event as an ExtendableEvent.
  4. Await the waitUntil promise if that was set by the application.
  5. Clean up the state from the old subscription.

Note that the new subscription can share properties with the old subscription; but this process is necessary for any change where the application might have to share this information with the application server. Keeping the old information around until the application has confirmed that this has happened means that there won't need to be messages lost. We might also note that sometimes it can take some time for the update to happen.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions