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.
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.
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.
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.
Following sample prints security description from instrument definition message: