OnixS C++ Euronext Optiq MDG Handler  1.3.1
API documentation
Advanced Programming

Inner Contents

 Affecting Packet Gap Detection
 
 Low Latency Best Practices [UPDATED]
 

Detailed Description

This section provides information about more advanced development techniques supported by the Handler.

Thread affinity

FeedEngine provides an ability to set affinity mask for threads. For example, OnixS::Euronext::MarketData::OptiqMdg::FeedEngineSettings::threadAffinity method can be used to run FeedEngine's threads on the particular processor(s).

Warnings Concept

Miscellaneous non-critical issues may occur while the Handler's instance is being executed. The Handler processes such matters on its own; thus no special handling is required in that case. However, sometimes it is reasonable to be notified about such events. For this purpose, the Handler represents OnixS::Euronext::MarketData::OptiqMdg::WarningListener class and invokes its OnixS::Euronext::MarketData::OptiqMdg::WarningListener::onWarning member each time a non-critical issue occurs.

Controlling Logging in the Handler

The Handler logs all significant aspects of its execution. The log files are stored in the directory specified by the OnixS::Euronext::MarketData::OptiqMdg::HandlerSettings::logDirectory member value. Logging includes network data received and processed by the Handler and, of course, errors occurred at the execution time.

Since the Handler outputs logging data into regular files, this affects its performance and sometimes requires significant system resources, like space on the hard drive. The Handler exposes several parameters which allow adjusting certain kinds of logging and thus reducing the system load and increasing general performance.

The following table describes logging-related parameters exposed by the OnixS::Euronext::MarketData::OptiqMdg::HandlerSettings structure:

Settings Member Default value Description
logLevel OnixS::Euronext::MarketData::OptiqMdg::LogLevel::Info Specifies whether the Handler must output informational messages about its state as well as which kind of information must be put into the log. For more information, please, take a look at description of OnixS::Euronext::MarketData::OptiqMdg::LogLevel enumeration entries.
logSettings OnixS::Euronext::MarketData::OptiqMdg::LogSettings::Default If the logging is activated, this member specifies which additional data must be put into the log. For more information, please, take a look at description of OnixS::Euronext::MarketData::OptiqMdg::LogSettings enumeration entries.

Activating Logging Example

The following example demonstrates how to set up the logging at maximum level :

settings.logLevel = LogLevel::Debug;
settings.logDirectory = "./logs";
// Log messages will be stored in the file, as well as received binary packets and full state of updated order books.
settings.logSettings = LogSettings::TraceToFile | LogSettings::LogPackets | LogSettings::LogBooks;