Under normal flow, Handler logs all important aspects of its execution onto file system. Log files include also original market data processed by the Handler. This information is usually saved for analysis of non-standard situations which may occur during use of the Handler. However, it also can be used to reproduce normal Handler's behavior for a certain period of time.
Once Handler was executed with logging enabled, it's possible to use log files for further replay. First of all, logs must be backed up (copied to another location) or Handler's configuration must be updated to use another directory for new logs. This is because current implementation of the Handler doesn't support replay from the same folder in which new logs will be stored.
Market data replay can be done with the help of OnixS::Senaf::MarketData::Handler::start method. It uses OnixS::Senaf::MarketData::HandlerSettings::logs member containing list of logs to be replayed.
It's possible manually define list of log files to be replayed. Manually manipulating list of log files allows replaying log files whose names differ from names used by the Handler.
From listener callbacks perspective, there's no difference whether Handler processes market data from the network or from log files.
When market data is being replayed, OnixS::Senaf::MarketData::MessageInfo::receiveTime member returns time of corresponding log file entry. Therefore, the value returned by given member represents original time when market data packet was obtained from the network.
Sample application demonstrating Log Replay feature can be found in samples/LogReplay subfolder of Handler distributive package.