question

Upvotes
Accepted
16 5 8 12

How to check for STALE or SUSPECT item status in RFA C++ (SSL connection)

Hi Team,

Currently an application using RFA C++ ver 6.4.X and SSL connection.

How can the application identify for a specific set of exchange symbols (example <XXX.OQ>) if the item stops updating due to any factor? Is there sample source code available for reference?

Thank you.

treprfarfa-apistale
icon clock
10 |1500

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

Upvote
Accepted
665 3 5 6

Hello @NWM

The item status is made available by RFA to the application through the event client, the API does not log this to a file; It is up to the application what should happen as a result of this information, e.g. alert user(s) of the application, report the status to a log file or both.

I normally recommend that request/open-failure status information is made available by the application for support/diagnostics.

The API will only forward the status reported by the datafeed and those conditions within the local infrastructure, based on your description are you using Elektron Pulse to obtain health reports for the point of collection at the exchange? (as described in this article)

icon clock
10 |1500

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

Upvotes
665 3 5 6

Hello @NWM

The MarketData interface provides a Status type that will indicate when an instrument is STALE, i.e. being recovered and therefore not updating. There are two points you should note about STALE status:

The first is that it relates to technical issues in the delivery technology and does not reflect a market condition that might halt updates, e.g. Field PRC_QL_CD/118 = "SUS" for Suspended; These are market specific content details and if you require further information on this I recommend you contact our Data Content team via the Contact Us page. https://my.thomsonreuters.com/ContactUsNew?CUType=Incident

The second point to note about STALE status is that it indicates that recovery is being managed by the server, it does not imply that the application must take any action to recover the request.

To check for stale status, this information is delivered in a Status or an Image event via the applications implementation of

rfa::common::Client::processEvent(const rfa::common::Event & event); 

As with all RFA MarketData applications we must establish the type of event received by testing the return type of the Event.getType() method, for the status of an item we are interested in MarketDataItemEvents, i.e:

if ( event.getType() == rfa::sessionLayer::MarketDataItemEventEnum ) 

This allows us to safely cast the event to a MarketDataItemEvent

const rfa::sessionLayer::MarketDataItemEvent & MDEvent = 
static_cast<const rfa::sessionLayer::MarketDataItemEvent&>(event); 

We can now access the method :

rfa::sessionLayer::MarketDataItemEvent::getMarketDataMsgType();

to establish if we have an event that holds status, we are looking for this method to return

rfa::sessionLayer::MarketDataItemEvent::Status 

or

rfa::sessionLayer::MarketDataItemEvent::Image 

We can then safely use the MarketDataItemEvent::getStatus() method which returns a reference to a MarketDataItemStatus object. You can then test for a stale state as follows:

if( MDEvent.getStatus().getState() == 
	rfa::sessionLayer::MarketDataItemStatus::Stale ) 

Of course if this method returns Closed, ClosedRecover or Event.isEventStreamClosed()==true, then the request is closed and no further updates will be received.

The example application RFASTTicker in the RFA C++ developer kit shows some of this activity.

icon clock
10 |1500

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

Upvotes
16 5 8 12

Hello @David Thomas, Thank you for the detailed reply and the code example.

Regarding the points you mentioned, yes this is understood that the STALE Status does not indicate market condition. (For market condition check, there are other business rules in place). I'm interested in capturing the STALE status related to failure of delivery technology and/or Exchange related failure. There have been some cases in the past where our system was unable to detect that the updates had stopped. So, we are looking for way to be able to capture the status and take quick action in the event data updates are stopped.

Does RFA write the Item Status ("SSL_ET_ITEM_STATUS_STALE") to the rfa log file?

Thanks & Regards

icon clock
10 |1500

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

Upvotes
16 5 8 12

Hello David, Thank you for the explanation and sharing the Elektron Pulse information.

Is the Pulse service "API_ELEKTRON_EPD_RSSL" enabled by default on EaaS service?

Regards,

NWM

icon clock
10 |1500

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

Click below to post an Idea Post Idea