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 backup 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.