OnixS C++ CME Market Data Handler  2.56.0.0
Adjusting Handler's Settings

Handler Settings

OnixS::CME::MarketData::Handler constructor accepts instance of the OnixS::CME::MarketData::HandlerSettings class which defines values for various parameters which affect Handler's behavior. Below section describes role of the most important parameters used in usual cases.

Primary Settings

Market Data Channel

CME market data is distributed across multiple logical units to reduce network and client system load. These logical units are called as channels. Therefore, first of all Handler requires channel to be identified to be able to process market data. OnixS::CME::MarketData::HandlerSettings class exposes OnixS::CME::MarketData::HandlerSettings::channelId parameter to instruct the Handler market data of which channel must be processed.

Market Data Configuration

Handler also requires market data configuration to be specified. Data stored in this configuration is used by the Handler to identify network connectivity attributes for a particular market data channel.

Note
Market data configuration provided by the CME Group and available on their public FTP servers. CME Group updates market data configuration on regular (weekly) basis. Visit the CME Group Client Systems Wiki for more information about configuration updating schedule as well as how to access to public FTP servers.

OnixS::CME::MarketData::HandlerSettings class exposes OnixS::CME::MarketData::HandlerSettings::channelsConfigurationFile parameter whose value must take on a path to the locally stored copy of such configuration file.

Note
Single market data configuration file contains settings for all market data channels. However, CME Group uses different market data configurations for different environments (like Production and Certification environments). Multiple instances of the OnixS::CME::MarketData::Handler class can be initialized to use either single or different market data configurations. In other words, there's no any problems to use multiple instances of the Handler to connect to different environments.

Coding Templates

All CME Group market data messages are FAST-encoded to lower latency dissemination. FAST coding supposes use of coding templates. Therefore, Handler requires such information to be specified for proper decoding market data messages. OnixS::CME::MarketData::HandlerSettings class exposes OnixS::CME::MarketData::HandlerSettings::codingTemplatesFile member to instruct the Handler where the coding templates file is located.

Note
Similar to the market data configuration, single coding templates file can be used for different channels within single operating environment (like Production or Certification ones). CME Group maintains all coding templates files for all operating environments by its own and updates them on regular (weekly) basis. All this data is available on public FTP servers of CME Group.

Directory for Log Files

By default, Handler logs all important aspects of its activity while processing market data. Therefore, it must know where on local file system it can store this kind of information. OnixS::CME::MarketData::HandlerSettings::logDirectory parameter value must be defined to point the Handler in which directory it can place its log files.

Example

Following example demonstrates how to setup primary settings for the Handler:

using namespace OnixS::CME::MarketData;
constructHandler(const ChannelId& channelId)
{
HandlerSettings settings;
settings.channelId = channelId;
// Please, always make sure the latest versions of
// configuration & templates are obtained from FTP.
settings.channelsConfigurationFile = "config.xml";
settings.codingTemplatesFile = "templates.xml";
// Logs will be stored in 'logs' local subfolder.
settings.logDirectory = "logs";
return new Handler(settings);
}