OnixS C++ FIX Engine  4.10.1
API Documentation
Restoring Session State from Log Files

When the OnixS::FIX::Session::Session object with a file-based session storage is created anew after an Engine restart, the FIX Session state (the sequence numbers of last received and sent messages, the previously sent messages, etc) is restored from these files.

To start a FIX session as a new one (so-called "clean start"), it is necessary to remove the session files from the previous runs.

Connecting parties must bi-laterally agree as to when sessions are to be started/stopped, and log files are backed up based upon the individual system and time zone requirements.

When the FIX session is finished, the session files are not needed anymore. They can be backed up, and later a new FIX session with the same OnixS::FIX::Session::senderCompId and OnixS::FIX::Session::targetCompId will start sequence numbers from 1. The usual practice is to back up the log files at the end of each business day (so-called "End Of Day procedure") to start the sequence numbers from 1 at the beginning of the next day.

Note
To reset the sequence numbers to 1 and back up, the log files OnixS::FIX::Session::resetLocalSequenceNumbers member must be used. This method can be called only when the session is disconnected.