Connectivity Configuration | Table of Content | Working with Books |
Replaying Log Files |
This section provides information about log replay feature supported by the OnixS ICE iMpact Multicast Price Feed Handler.
Log replay future provides ability to save time and money when to pay for connection to the Production Environment and this takes a lot of money. Instead this Handler can record all events occurring on the Exchange and in the future be able to play them repeatedly. All you need to do - save log files.
Before using a Handler to play the log files, it is necessary to prepare the appropriate settings. The instance of HandlerSettings created and AddLogReplayEntry(String) should be used to pass path(s) to log file(s). The constructor Handler(HandlerSettings) takes this settings and handler reads all Base64-based data from the log file and processes these data as data received from the network.
During log replay the Handler may cause errors. If this happens Handler calls the special callback ErrorOccurred. When replay log is finished the Handler calls the LogReplayFinished.
The Handler can generate more than one log file. This depends on the Handler's settings but if you want to record the whole trading day and then replay this data you will need to deal with multiple log files.
In order to replay the data from the multiple log files you need to add all the log files using AddLogReplayEntry(String) in order they have been created. You should keep this order as there is no logic to sort the log records and the Handler will just read all the data sequentially.
Note |
---|
Log replay for multiple sessions is not supported. If you started and stopped the Handler several times for a single log file the log replay can't be used as it will normally replay the first session and then failed. |