Sequence numbers are used to deduplicate client events.
In current implementation sequence number is persisted only during client pause/shutdown. This causes invalid sequence number states of client during non graceful shutdown. Invalid sequence number state also causes ignore of events on server side.
We should review and improve client behavior and client-server communication protocol to recover from cases described above.
With the first sync request, the endpoint attempts to synchronize its event sequence number with the one stored on the Operation Server.
The server answers with the sequence number of the latest event received from the endpoint. If the number provided by the server differs from the number stored on the endpoint, the endpoint accepts the former and uses it as a starting number for new events.