question

Upvotes
Accepted
185 6 12 26

Detect No data or stale data for Level1 and Level2 subscriptions

Hello,

We are using RFA 8.1 C++ api to consume Level1 and Level2 data market data. Recently we came across many situations where our mutual client UBS reported multiple instances of No or stale Level1 and Level2 data. It happened across multiple exchanges. We are trying to figure out if api has some sort of sample application or utility tool that can be used to detect if data coming from your servers is itself has some problem or it's our adapter that has problem. Can you suggest approach here?

#technologyrfa-apistale
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Hello @mktdata

Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query?


If so please can you click the 'Accept' text next to the appropriate reply? This will guide all community members who have a similar question.

Thanks,


AHS

Upvotes
Accepted
24.7k 54 17 14

Hello @mktdata

The RFA StartConsumer example has a code that checks (and prints) the Response Status message from the Provider. You can find it from the following methods.

### processLoginResponse ###

void StarterConsumer::processLoginResponse(const rfa::sessionLayer::OMMItemEvent& event, const RespMsg& respMsg)
{
   ...
   switch(respMsg.getRespType())
   {
      ...
      case RespMsg::StatusEnum:
            if(respMsg.getHintMask() & rfa::message::RespMsg::RespStatusFlag)
            {
                if(status.getStreamState() == RespStatus::OpenEnum && status.getDataState() == RespStatus::OkEnum)
                {
                    AppUtil::log(__LINE__, AppUtil::TRACE, "<- Received MMT_LOGIN Status - Login Accepted%s", text.c_str());
                    processLoginSuccess();
                }
                else if(status.getStreamState() == RespStatus::OpenEnum)
                    AppUtil::log(__LINE__, AppUtil::WARN, "<- Received MMT_LOGIN Status - Login Pending%s", text.c_str());
                else
                    AppUtil::log(__LINE__, AppUtil::ERR, "<- Received MMT_LOGIN Status - Login Denied%s", text.c_str());
            }
            else
                AppUtil::log(__LINE__, AppUtil::ERR, "<- Received MMT_LOGIN Status - No RespStatus");
            break;

### processMarketPriceResponse ###

void StarterConsumer::processMarketPriceResponse(const rfa::sessionLayer::OMMItemEvent& event, const RespMsg& respMsg)
{
   ...
   if(respMsg.getHintMask() & RespMsg::RespStatusFlag)
    {
        const RespStatus& status = respMsg.getRespStatus();
        text += OMMStrings::respStatusToString(status);
    }


You can find more detail about the Status Response Message in the following sections of the RFA C++ Developer Guide:

  • Chapter 7.4.2 Response Status (Stream States, Data States, and Status Codes
  • Chapter 7.4.5 Processing RespMsg Example


icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Thank you. I will go through them.
Upvotes
78.9k 250 52 74

@mktdata

Thanks for reaching out to us.

Typically, you can verify the status text for the reason of stale data.

The stale data can be from connection down, service down, request timeout, or problems on the Refinitiv Real-Time Distribution System (RTDS), or data feed.

Otherwise, you can enable debug logs and tracing in the API to verify the sent and retrieved messages. However, enabling tracing in the API can impact the performance of the application.

I hope that this information is of help.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

@Jirapongse Do you think any of the api sample application can be used instead of enabling debug or tracing logs?
@mktdata

You can use the testclient tool (with log enabled) in the ADS package to subscribe to the same set of RICs. This tool can be used to verify the messages retrieved from the infrastructure or data feed.

Otherwise, you can modify and run the Consumer or StarterConsumer example (with trace enabled) in the RFA package to subscribe to the same set of RICs.

Upvotes
185 6 12 26

@Jirapongse Can you guide me to sample code on how to check status text? FYI, we are using RFA 8.1 C++ api. There are sample applications that are available with api package that we downloaded. If you point me to appropriate sample application that checks for status text, that would be nice.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.