OnixS C++ CME Market Data Handler  2.56.0.0
Using TCP Replay Facility

Recovering from Message Gaps

Handler receives market data through network multicast feeds. Due to a multicast nature, data may come in wrong order or may be completely lost. Handler does its best to fix all the network-related issues. However, message gaps may still happen while processing market data.

CME market data system provides its clients with an ability to request and obtain lost messages using reliable TCP connection. This facility is called a TCP Replay. If the Handler is configured to use TCP Replay facility, in case of message lost, it doesn't report error immediately and falls into books resynchronization. Instead, it suspends regular processing and requests remote system to resend missed messages. Once lost messages are successfully received from the system, Handler resumes regular processing without restarting its execution.

Enabling TCP Replay

To use TCP Replay facility, first of all, it's necessary to contact CME support for TCP Replay credentials. Once login and password information is obtained, it can be passed to the Handler and TCP Replay feature activated.

Following example demonstrates how to enable use of TCP Replay feature in the Handler:

using namespace OnixS::CME::MarketData;
Setting settings;
// Take advantage of TCP Replay feature.
settings.useTcpReplay = true;
// Fill connection credentials.
settings.tcpReplayUsername = "MyLogin";
settings.tcpReplayPassword = "MyPassword";
// In case of absence of a response from the remote
// system, Handler will try to reconnect three times
// with half-of-minute interval between each attempt
// before it reports about inability to establish
// connection.
settings.tcpReplayReconnectAttempts = 3;
settings.tcpReplayReconnectIntervalInMilliseconds = 30000;
// Other settings go here.
...
// Initialize the Handler.
Handler handler(settings);
...