OnixS C++ CME Market Data Handler  5.5.1
API documentation
Managing Feed Connection Settings

Available Configuring Alternatives

To make market data processing happen, the connection settings for the feeds participating in data processing are to be defined. There're two ways to supply connectivity information to the Handler.

The first one supposes explicit update of the corresponding parameters for each of the feeds used by the Handler during the market data processing session. The second way allows to retrieve connection data from a connectivity configuration file published by CME. The following sections uncovers boths ways in details.

Setting up Connection Parameters Explicitly

All parameters defining the feed connection are gathered into the OnixS::CME::MDH::FeedConnectionSettings class. The primary attributes are:

The OnixS::CME::MDH::FeedSettingsBase template class includes two members, OnixS::CME::MDH::FeedSettingsBase::A and OnixS::CME::MDH::FeedSettingsBase::B, exposing connection-related settings for the primary (A) and secondary (B) feed correspondently.

The master OnixS::CME::MDH::FeedSettings class exposes instances of settings referring to a particular feed type (instrument, incremental, snapshot, etc). All type-specific feed settings are derived from the mentioned OnixS::CME::MDH::FeedSettingsBase template class. Thus all feed connection settings can be manipulated in a uniform way.

The code snippet below depicts how to manually specify connectivity parameters for the primary (A) incremental feed:

Handler handler;
feedConnection =
// Unique id.
// Multicast group IP address.
// Multicast group port.
#if !defined (_WIN32)

Loading Connectivity Configuration from a File

The CME publishes all connection-related information in a XML-formatted file.

The SDK offers the new OnixS::CME::MDH::connectivityFromConfiguration function allowing connection parameters retrieval from the noted connectivity configuration file. The function extracts data for all feeds belonging to a particular channel and updates correspondent parameters of the given OnixS::CME::MDH::FeedSettings class instance.

Also, the OnixS::CME::MDH::FeedSettings class includes OnixS::CME::MDH::FeedSettings::connectivityConfigurationFile member which supposes specifying path to the connectivity configuration file instead of manual setup. Once set, the Handler will load connection settings from the specified file.

The connectivity configuration file includes following attributes of the feed connection: id, ip, port, and hosts. Information on network interfaces is environment-specific and thus isn't stored in the file. Therefore, the network interfaces must be defined explicitly using the correspondent members.
The OnixS::CME::MDH::FeedSettings::connectivityConfigurationFile parameter has lower priority comparing to the manual and explicit update of connection-related parameters. That means, the Handler will ignore loading connection settings from the specified configuration file if connection settings were manually defined. Instead, feed connection settings will be used by the Handler while initializing market data processing session.

Selecting Data Center

CME maintains additional data centers to be used in special cases like a disaster. Information on how to connect to a specific data source belonging to a specific data center is also included into in the configuration file. Therefore, both the OnixS::CME::MDH::connectivityFromConfiguration and the OnixS::CME::MDH::FeedSettings::connectivityConfigurationFile functions include additional parameter that allows choosing which datacenter connection settings to use.

const ChannelId channel = 310;
Handler handler;