OnixS C++ CME Market Data Handler  2.56.0.0
Raw Market Data Processing

Processing FIX Messages

High-level Handler's API allows to get rid of protocol specific and use directly high-level entities like security definitions, trading information and books. Advanced events are exposed by the Handler to allow client code to build books by itself using data of atomic changes.

The Handler exposes additional level of flexibility by providing ability to access instances of FIX messages as they come from the market data platform and being processed by the Handler.

To listen for a such kind of data (FIX messages), it's necessary to implement OnixS::CME::MarketData::MessageProcessingListener class interface and associate appropriate instance with a Handler using OnixS::CME::MarketData::Handler::registerMessageProcessingListener member.

Handler notifies client code when it begins and accomplished processing of a message. OnixS::CME::MarketData::MessageProcessingListener::onProcessingBegin member is called when the Handler starts processing a message. OnixS::CME::MarketData::MessageProcessingListener::onProcessingEnd is called when message processing is accomplished.

Outage in FIX Messages Processing

Due to multicast unreliability network data delivery may be suspended or interrupted. If the Handler detects data absence for a certain period of time, it invokes OnixS::CME::MarketData::MessageProcessingListener::onProcessingSuspended.

Note
Since the moment of OnixS::CME::MarketData::MessageProcessingListener::onProcessingSuspended invocation all information in all order books should be considered as outdated. Once data delivery is restored, up-to-date books will be provided through appropriate callbacks like OnixS::CME::MarketData::DirectBookUpdateListener::onDirectBookUpdated.

FIX Messages Processing Order

Note
FIX messages transmitted over incremental feeds and passed by the Handler to the listener's members are previously verified and checked for a proper order. If the Handler notifies listener about beginning of message processing received via incremental feed, it's guaranteed message is not out of sequence.

However, messages obtained from different feeds like snapshot and instrument feeds have uncorrelated sequence numbers. Therefore, user code must not rely on the fact messages are lined up into one single sequence.

Miscellaneous

Handler exposes OnixS::CME::MarketData::Message class as an abstraction of a FIX message. Structure and functionality of this class is similar to the FIXForge::CPP::FIX::Message class available in the OnixS FIX Engine API. For more information on what is FIX message and how its data can be accessed, please visit online documentation of the FIX Engine.

API also exposes OnixS::CME::MarketData::Tags structure containing symbolic constants to access corresponding FIX fields.

Example

Following sample prints security description from instrument definition message:

void
MyListener::onProcessingBegin(
const Message& message, const ChannelId& channel)
{
if (message.getType() == "d")
{
cout << message.get(Tags::SecurityId) << endl;
}
}
Note
See New FIX Message Interface for details on new FIX messaging services.