OnixS C++ CME MDP Premium Market Data Handler  5.8.3
API Documentation
TCP Recovery

The handler receives real-time market data via the UDP multicast protocol. Due to the nature of this protocol, data may come in the wrong order or be lost entirely. The handler does its best to fix network-related issues. However, network packet gaps may still happen while processing market data.

The CME Market Data Platform (MDP) allows clients to obtain lost data using a reliable TCP connection. This service is called TCP Recovery. If the handler is configured to use TCP Recovery Feeds, in case of data loss, it doesn't report an error immediately and does not fall into a Market Recovery Feeds -based book recovery. Instead, it suspends the regular processing and requests the remote system to resend missed data. The handler resumes standard processing once it receives lost packets from TCP Recovery Feeds.

If a request to recover missed data via the TCP Recovery feed fails, the handler tries to recover lost packets the number of times set via the OnixS::CME::MDH::TcpRecoverySessionSettings::attempts parameter.

Sometimes, the missing data cannot be received due to a malfunctioning TCP Recovery feed. To prevent being locked indefinitely in the TCP recovery, the handler limits the time it spends attempting to recover the missing data via the TCP Recovery feed. The update the limit, use the OnixS::CME::MDH::TcpRecoverySessionSettings::servingTimeLimit parameter.

If the handler cannot recover lost packets for a predefined number of attempts or the allocated time for recovery is out, depending on the configuration settings, the handler starts the Market Recovery Feeds -based recovery or resumes real-time processing using the Natural Refresh approach.

Note
The CME MDP limits the number of TCP recovery requests it serves per second. The OnixS::CME::MDH::TcpRecoverySettings::maxRequest parameter allows configuring this value. If the number of requests exceeds the defined limit, the TCP recovery service rejects the recovery request. In this case, the handler must either repeat an attempt to recover missing data using the TCP Recovery feed or use other approaches to recover missed data.

Enabling TCP Recovery

It is necessary to contact the CME support team for TCP Recovery credentials to use a TCP Recovery service.

Note
CME MDP does not allow multiple recovery requests to be served simultaneously using the same credentials. Only one TCP recovery session can be active at a time, and simultaneous requests are not allowed. For this reason, the SDK exposes the TCP Recovery service as a shared one, so it can be bound to multiple Handler instances.

The following example demonstrates how to use the TCP Recovery service:

Handler handler;
handler.settings().channel(310).connectivityConfigurationFile("config.xml");
TcpRecoverySettings tcpRecoverySettings("TcpRecoveryUsername", "TcpRecoveryPassword");
TcpRecoveryService tcpRecovery(tcpRecoverySettings);
// Activate the TCP Recovery.
handler.settings().session().tcpRecovery().service(&tcpRecovery);
handler.start();
See also
TCP Recovery Feeds