OnixS C++ CME Market Data Handler  2.56.0.0
Network Packets Pulling Strategies

To achieve best efficiency in for different cases, Handler provides a few ways of handling incoming network packets. OnixS::CME::MarketData::HandlerSettings exposes new parameter OnixS::CME::MarketData::HandlerSettings::packetsPullingStrategy affecting the way Handler listens to and processes network packets transmitted by MDP.

Direct Packets Pulling and Processing

In this mode, packets are received and processed sequentially. New packets are not received unless previously received packets are processed.

To use direct pulling mode, set OnixS::CME::MarketData::HandlerSettings::packetsPullingStrategy parameter to OnixS::CME::MarketData::PacketsPullingStrategies::Direct.

Buffered Packets Pulling and Processing

Packets are being received as soon as they arrive on network and in spite of the state of previously received data. Handler uses additional internal buffers to keep incoming market data and to avoid packets missing in case of slow market data processing.

Handler uses this mode by default. To use buffered pulling mode explicitly, set OnixS::CME::MarketData::HandlerSettings::packetsPullingStrategy parameter to OnixS::CME::MarketData::PacketsPullingStrategies::Buffered.

Note
Number of received packets stored in buffer is limited by OnixS::CME::MarketData::HandlerSettings::packetQueueMaxSize parameter.

Performance Considerations

Both packets pulling strategies have practically same performance and latency characteristics. Packets are usually received and processed within the same thread thus no context switching occurs and no shared queues are used while Handler processes market data. Even if buffering is used, efficient lock-free containers are used to prevent processing from being locked.