question

Upvotes
Accepted
25 0 2 3

How to automatically switch connection between ads server using Elektron API

How to automatically switch connection between ads server using Elektron API.

In configuration we have defined API to connect to 4 ads servers , however if there is any issues at Refinitiv end when the ads are online but not working , API is not automatically failing over to the secondary servers

elektronrefinitiv-realtimeelektron-sdk
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
11.5k 16 7 10

Hello @debashish.bisoi

Please be informed that the API does not have a feature to switch to secondary server if the server does not send message to the API or in item stale scenario. The API automatics fail over when it disconnect from the current server only.

Basically, the application can set the RequestTimeout parameter in the EmaConfig.xml file to specify the amount of time (in milliseconds) the API waits for a response (Refresh and Status response message) from server. The default value is 15000 (15 seconds). If the timeout is reach, the API sends the Status Response message with status text "Request timeout" message to the application.

Regarding the item stale scenario, if the application receives OMM State “Open/Suspect” from the API which is

  • OmmState.StreamState: "Open"
  • OmmState.DataState: "Suspect"

It means the item stream is still open but the server cannot provide data for the application right now. It does not mean the ADS is down, or the ADS connection is lost. The API and TREP will automatic recovery item subscription for the application once the problem resolved on the server-side.


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.

Thanks a lot Wasin.

Upvote
11.5k 16 7 10

Hello @debashish.bisoi

Which Elektron API that you are using?

If you are using the EMA API, you can ChannelSet parameter of a Consumer node in EmaConfig.xml to specify fail over connection. Please see more detail regarding this parameter in this question.

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
25 0 2 3

Thanks Wasin , i do have it set up in EmaConfig.xml but stili it didn't failover . This happened on 21st when Refinitiv itself had some problem with one of their data center as mentioned in the alert :

"

Thomson Reuters Elektron Real-Time Bandwidth Optimised services for customers connected to the CC2 (Chicago, 350 E, Cermak) Distribution Point of Presence (DPoP) were disrupted until 08:45 GMT on 22-Jun-20.

This was due to an issue at the Refinitiv.

Status at 09:10 GMT on 22-Jun-20 :The service is available since 08:45 GMT on 22-Jun-20 after Refinitiv resolved the issue."


Error seen in ADS :

<rcotrep01.1.adh.3.sourceThread.serviceGenerator.eedroute.route.IDN_RDF: Info: Sun Jun 21 06:57:47 2020>

Request to source application for item /1831.SE MARKET_PRICE with request ID 1269735 has timed out. Item has been deleted.

<END>


API returned me error :

<rcotrep01.1.adh.3.sourceThread.serviceGenerator.eedroute.route.IDN_RDF: Info: Sun Jun 21 06:57:47 2020>

Request to source application for item /1831.SE MARKET_PRICE with request ID 1269735 has timed out. Item has been deleted.

<END>


but still it didn't automatically fail over to the secondary ads server which were working fine until we manually removed all the primary ads server from API and pointed it to just secondary

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
25 0 2 3

sorry the API error was :

INFO: com.frk.prreu.ReutersAPIWrapper - getConnectionAndRetrieveData -> Connecting to Reuters server with Host: rcotrep02 and Port: 14002 for User Id: 721002

Jun 22, 2020 1:18:11 AM com.frk.prreu.PRREUfetch logMessage

INFO: com.frk.prreu.ReutersAPIWrapper - getConnectionAndRetrieveData -> Connection succeeded for Host: rcotrep02 and Port: 14002 for User Id: 721002

Jun 22, 2020 1:18:11 AM com.frk.prreu.PRREUfetch logMessage

INFO: com.frk.prreu.ReutersAPIWrapper - getConnectionAndRetrieveData -> Working on list of Securities and corresponding RIC feed values for obtaining prices

Jun 22, 2020 1:18:11 AM com.frk.prreu.PRREUfetch logMessage

INFO: com.frk.prreu.ReutersAPIWrapper - getConnectionAndRetrieveData -> Exception: Reuters Server not responding properly.

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
11.5k 16 7 10

Hello @debashish.bisoi


Please be informed that the API fail over to the next server (Channel) in the ChannelSet when the API disconnect with the server only. Based on the given alert information, the problem seems the issue occurred in the item/service level.

The "getConnectionAndRetrieveData -> Exception: Reuters Server not responding properly. " log is the application log, not the API log, you may need to check which error or Status Response Message that generated this log in the application level.

  • Did the application receive other subscription items data from ADS rcotrep02 when the problem occur?
  • Could you please give me the RSSL tracing message when the problem occurs and your EmaConfig.xml file?
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
25 0 2 3

Please find the emaconfig file

no it didn't receive items data from rcotrep02 , Only when we swtiched api to point to the backup server(stktrep01, stktrep02) manually it was able to fetch data.


Error is defined as :

public boolean getStatus(boolean value) throws Exception {

if(dictCount == ricCount){

if(onstatuserror.contains("F56: Host Down") || onstatuserror.contains("Item is stale")){

throw new Exception("Reuters Server not responding properly. Please contact MDS team");

}

return false;

} else {

return value;

}


EmaConfig.zip


emaconfig.zip (3.4 KiB)
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
11.5k 16 7 10

Hello @debashish.bisoi

I did a quick test on your EmaConfig.xml file, it configuration and API can fail over successfully in my test steps as following

  1. Run EMA API example 110 which uses Consumer_2 configuration
  2. The API connects and receives data from the first ADS server successfully
  3. Kill the first ADS server
  4. The API detects a disconnection, then fail over to the 2nd ADS server
  5. All items subscriptions are recover

The on the given source code, it seems when the problem occurred, the connection between primary ADS and API were not disconnect,but the item is stale from the back end issue (based on the Alert).

Basically, the API will not fail over in this kind of scenario because the connection between API and ADS still fine.

If the application receives "state="Open / Suspect " Status message from the API, it means the item stream remains open. The API and TREP will automatic recovery item subscription for the application once the problem resolved on the server-side.

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
25 0 2 3

Thanks Wasin, this explains

May i ask you if there is any way we can specify a timeout or something like this when the response is not received after certain time interval , API closes the session and switches to secondary ads server

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
25 0 2 3

Please suggest if there is any way we can specify a timeout or something like this when the response is not received after certain time interval , API closes the session and switches to secondary ads server

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