question

Upvotes
Accepted
0 1 1 5

Check if TREP Feed provider is active and running.

Good day,

We are working via the TREP platform (using the EZD application) to retrieve market rates for our Bank's application.

We connect via the RFA for .NET API to TREP to pull the live stream of data, however, if the connection to TREP (i.e. the EZD application) goes offline or if the server should lose connection, we just receive 0's for ASK and BID price for the currencies we are retrieving and there is no clear indicator that the feed is actually offline.

Is there some functionality that could provide me with an indicator of whether or not the Feed is actually working so I can return an exception to my clients consuming the web service I have developed to inform them that the service is down?

Thank you,

Regards,

elektronrefinitiv-realtimetrep
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
Accepted
7.6k 15 6 9

There are two points in this case.

#1 You want to detect the status of data feed. Source Directory Domain can help you in this case. If your application register for Directory message, you will receive directory update about the service status. If the service has gone down or up again, you will receive directory update message. You can find the example to implement the application to receive directory message from Consumer example which locates in folder Examples of RFA.NET package. And you can find more details about the Source Directory domain from RDMUsageGuide (RDMUsageGuideNET.pdf) and there are some description about the implementation in RFA.NET developer guide.

#2 You receive 0 for ASK and BID price when the data feed has gone down. I guess that this is because you did not check Response Type as Lars said. The status message does not contains payload and field list. It has only RespStatus. You may need to review your implementation.

Consumer example should be the goods one to learn about the implementation.

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
1.5k 3 5 7

Hi Eduard.

You should be "receiving" message of type RespMsg.RespTypeEnum.Status, one for each of your open subscriptions. This message will tell you, in the RespStatus.DataState, that the item is now SUSPECT. Are you sure you are correctly processing such messages? I put the word "receiving" in quotes because technically your application is not receiving over the wire one message per active stream (that would be inefficient, and because when a connection is broken the application for obvious reasons cannot receive anything, duh! :-)). Instead the RFA library will detect that the connection is broken and then "send" an event (messages of type Status) into your code, one for each active stream. This is what is called a fan out. You will also receive Status messages at the level of the services (assuming you are subscribing to DIRECTORY messages too). Really, all you have to do is track those Status messages and take appropriate action when the status of an item changes. (you do not normally have to track status of services, there's really no need to).

As for the 0 values, I suspect this is something your own code is doing. Are you sure you are correctly checking for so-called blank values when unfolding the values received from TREP? Are you sure you are not forcing the values received from RFA into primitives in your own code (e.g. into a double or float). If so, then that would explain why they become 0. You should have a strategy for dealing for blank values. They are not same as zero and shouldn't be represented as such. Zero is a perfectly valid (and even tradeable) value for some financial instruments so you cannot use that value to represent "absent". This is why primitives fall short in this respect: they cannot represent absent/null.

I hope this is enough for you to progress.

Kind regards

Lars

Addicticks

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