RTSDK/C++ how to recover from a login, channel or stream down situation

Hi,

We are reading market data using Real-Time Optimized

As per the training code sample, the OmmConsumer object is created and multiple instruments (clients) are registered

The system works well, so we get onRefreshMsg(), or onUpdateMsg() calls with the data

When there is an error in emaLog, e.g.:

loggerMsg

TimeStamp: 12:42:24.241

ClientName: LoginCallbackClient

Severity: Error

Text: RDMLogin stream was closed with status message

<text removed>

State: Closed / Suspect / Internal error from sender / 'Login Denied:Failed to validate sso token'

loggerMsgEnd

Then our system no longer receives any more updates on any of the instruments

How do we check if we have lost the stream or connection?

How do we reconnect?

We have some commented out code in onStatusMsg(), i.e.:

if (statusMsg.hasState() && statusMsg.getState().getStreamState() == OmmState::OpenEnum)

{

}

If this is the right place to check for an error, then how do we recover the login, channel or stream?

Thanks

Tagged:

Best Answer

Answers