Selecting Storage for Session Messages Logging | Table of Content | Customizing Logging |
Restoring Session State from Logs |
When the Session object with file-based session storage is created anew after an Engine restart, the FIX Session state (the sequence numbers of last received and sent messages, 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 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 SenderCompID and 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 local sequence numbers to 1 and back up the log files, the ResetLocalSequenceNumbers() member must be used. This method can be called only when the session is disconnected. |