Versioning
MCoP has two version numbers: the protocol version of the message layer, and the conversation version of the event schema. Both are negotiated once per connection, at initialize.
Protocol version
- The client sends
protocol_versions, most preferred first. Version 1 is"1". - The server answers with
protocol_version, the first version it also speaks. - If there is no common version, the server answers
unsupported_versionand does not accept the connection.
Conversation version
- The client sends
conversation_versions, the schema versions it can read. - The server answers with the versions it can write, and each snapshot names its
conversation_version. - A client MUST ignore fields it does not know. A server MUST NOT remove a field within a version.
Downgrades
When the client asks for features the server does not offer, the server does not refuse the connection. It leaves them out and lists them in downgrades. The agreed object lists what both sides will use. A client SHOULD check downgrades and adapt its behavior, for example by not showing a surface when the server does not send them.
What needs a new version
| Change | Compatible within a version? |
|---|---|
| Adding an optional field | Yes |
| Adding an event type that old clients can ignore | Yes |
| Adding a command type | Yes, if old clients never need to send it |
| Removing or renaming a field | No |
| Changing the meaning of a field or a disposition | No |
| Changing the digest or the cursor format | No |
A change that is not compatible requires a new protocol version. The old version keeps working until it is retired in the Changelog.
Next steps
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.