A sequence number which must be incremented for each message sent by this peer.
The actual data of the message.
The document ID this message pertains to.
The ID of the session this message is part of. The sequence number for a given session always increases.
Ephemeral messages are not persisted anywhere. The data property can be used by the application as needed. The repo gossips these around.
In order to avoid infinite loops of ephemeral messages, every message has (a) a session ID, which is a random number generated by the sender at startup time; and (b) a sequence number. The combination of these two things allows us to discard messages we have already seen.
An ephemeral message.