The instrument-definition-feeds constantly loop "Security Definition" messages and thus lets a client system and the handler obtain the current set of instruments available on a channel. Any additions, modifications, and deletions to available instruments are reflected as soon as a new loop of the recovery data begins. By default, the handler processes recovery data from the beginning of a loop to have an accurate set of available instruments. If the handler joins the feed in the middle of a loop, it waits till its end. When the number of security definitions being looped is significant, it takes a while for the handler to get all instrument definitions recovered. As a result, client systems using the handler may need a faster way of recovering security definitions. For this reason, the SDK offers several instrument recovery strategies.
The following table describes instrument recovery options exposed by the SDK:
This strategy tells the handler to recover instruments most accurately. In particular, the handler processes Instrument Definition messages from the beginning of a recovery loop. If the handler joins the Instrument Recovery feed in the middle of a recovery loop, incoming data is ignored until a new loop begins. Also, suppose the handler detects a gap in a sequence of incoming packets. In that case, it will stop processing Instrument Definitions till the end of a loop and restart the recovery from the beginning of a new loop.
The given way to recover instruments is recommended for the channels where user-defined instruments are frequently added or removed during the trading week.
|OnixS::CME::MDH::InstrumentRecoveryOptions::Fast||The fast mode allows starting processing Instrument Definition messages from the middle of a recovery loop without waiting for the beginning of the next loop. In case of data loss, missing definitions are recovered from the following loops. This approach allows recovery quicker. However, the recovered set of instruments may not be accurate because of differences in the recovery loops from where the recovery data was taken.|
The OnixS::CME::MDH::SessionSettings::instrumentRecovery member allows defining the instrument definitions recovery strategy.
The following code shows how to tell the handler to recover instruments quicker than the standard approach: