The SDK allows fine-tuning market data processing to match business requirements.
Parameters defining the market data processing session's behaviour are gathered into the OnixS::CME::MDH::SessionSettings class. The OnixS::CME::MDH::HandlerSettings class exposes an instance of the given class through the OnixS::CME::MDH::HandlerSettings::session member.
The OnixS::CME::MDH::SessionSettings class defines whether market data recovery must be performed at the beginning of market data processing or in case of data loss or other processing errors, and so on. Also, settings define which type of market (by price or by order or both) to recover. Finally, the settings tell the handler whether to use the TCP Recovery to request missing data before recovering the market state from snapshots.
The table below describes parameters affecting market data processing:
|Defines whether the handler must recover either instruments or the entire market state, or nothing when joining the market. For a complete list of available options, see OnixS::CME::MDH::JoinRecoveryOptions::Enum members.
When live market data is processed, a failure may occur due to data errors or data loss. Using this parameter, it's possible to specify whether processing real-time market data should continue or the handler must recover the market state (e.g., to have accurate order books). Also, the handler may recover all instruments in addition to the market state to have an accurate list of traded securities.
See the OnixS::CME::MDH::GapAndErrorHandlingOptions::Enum for the complete list of available options.
If the processing session must perform instrument recovery due to either late join or processing failure, this parameter affects how security definitions are recovered.
By default, the handler processes recovery data from the beginning of a recovery loop to have the correct set of available instruments. If the handler joins the feed in the middle of a security definition dissemination loop, it waits till its end. When the number of security definitions being looped is significant, it takes a while for the handler to recover all instrument definitions. Also, data loss causes the handler to process security definitions from the beginning of the next loop. Client systems may need a faster way of recovering security definitions. For this reason, the SDK offers alternative ways of recovering instrument definitions.
For the complete list of options, see OnixS::CME::MDH::InstrumentRecoveryOptions::Enum.
If the processing session must perform market state recovery due to either late join or processing failure, this parameter allows defining a type of market to recover.
CME MDP Premium offers market-by-order (MBO) and market-by-price (MBP) data. Although the data for both MBO and MBP is disseminated via the same Incremental Feed, recovery is separated for each data type. The handler must be configured with the kinds of markets to be recovered.
For the complete list of options, see OnixS::CME::MDH::MarketRecoveryOptions::Enum.
|These parameters control the usage of TCP Recovery. Suppose an OnixS::CME::MDH::TcpRecoveryService instance is assigned (using the OnixS::CME::MDH::TcpRecoverySessionSettings::service setting). In that case, the handler tries to recover missing Incremental data using this service before it switches to recovering market state from snapshots or resumes Incremental data processing (depending on the OnixS::CME::MDH::SessionSettings::gapAndErrorHandling value).
The following code snippet shows how to configure a market data processing session to maintain order books accurately starting from the middle of a trading session (a.k.a. "late join").
The following code snippet shows how to configure a market data processing session to accurately maintain market-by-price (MBP) books, starting from the beginning of a trading session when the market is blank (no initial recovery is needed to catch up with the market).
The following code snippet shows how to configure market data processing to maintain order books in the natural refresh mode and to perform a full state recovery at a join stage. This configuration is frequently used when a server doing market data processing is collocated in the CME network, and the possibility of data loss is minimal. It provides almost the same benefits as accurate order book maintenance while preventing real-time processing freeze due to executing market recovery in case of data loss.
The following code snippet shows how to configure market data processing to maintain order books in the natural refresh mode. However, in contrast to a typical case, when real-time processing is resumed immediately, the handler tries to recover missing data using TCP Recovery Feeds.