For a deeper look into our Elektron API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
3 0 1 4

Refinitiv Real-Time - Optimized; web-socket sometimes immediately gets closed by server after sending login request

We have a java client that connects to Refinitiv RTO websocket and fetches data, recently more frequent disconnects started happening and they're causing us to lose data.

After investigating it seems like Refinitivs servers closes the websockets for no reason that we could find (confirmed by the log below)

public void onDisconnected(WebSocket websocket, WebSocketFrame serverCloseFrame, WebSocketFrame clientCloseFrame, boolean closedByServer) throws Exception {
    log.info("WebSocket disconnected closedByServer: {}", closedByServer);
--> WebSocket disconnected closedByServer: true

Also tried running the python example code when the issue started happening and i was able to replicate the issue (tried the script a few days earlier and can confirm that it worked); websocket closes when sending login request to server

2022-12-12 16:22:02,313 connect() Connecting to WebSocket wss://us-east-1-aws-3-med.optimized-pricing-api.refinitiv.net:443/WebSocket for session1...
2022-12-12 16:22:03,829 _on_open() WebSocket successfully connected for session1!
2022-12-12 16:22:03,830 _send_login_request() SENT on session1:
2022-12-12 16:22:03,830 _send_login_request() 

2022-12-12 16:22:04,163 _on_close() WebSocket Closed for session1
2022-12-12 16:22:04,163 _on_close() Reconnect to the endpoint for session1 after 3 seconds... 
2022-12-12 16:22:07,169 connect() Connecting to WebSocket wss://us-east-1-aws-3-med.optimized-pricing-api.refinitiv.net:443/WebSocket for session1.
<repeats until user stops the script>


Have taken a look at the documentation and haven't found anything that explains this behavior.

Appreciate any suggestions on this

#technologywebsocketsjavarefinitiv-real-time-optimised
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.

1 Answer

· Write an Answer
Upvote
Accepted
25.7k 58 17 14

Hello @antoniob

I am sorry to hear that you are facing this connection issue.

Does the issue always occur with this "us-east-1-aws-3-med.optimized-pricing-api.refinitiv.net" WebSocket server endpoint? Could you please retest with the endpoints in other availability zones or regions that are closer to you? You can find more detail about the RTO endpoints in all availability zones/regions from the Refinitiv Real-Time - Optimized New Hostnames August 2021 document (or using the Service Discovery feature).

The WebSocket API is also a server-side API, so you may contact the Refinitiv Real-Time - Optimized (RTO) support team directly to verify the connection issue. You can contact the team via this https://my.refinitiv.com/content/mytr/en/helpandsupport.html page.

rrto-ticket.png

Hope this helps.


rrto-ticket.png (22.1 KiB)
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.

Thanks @wasin.w,

As you suggested I've opened a support ticket and they've advised to do the same (to try with other endpoints)

I've tried to connect to an endpoint in Europe and it's indeed more consistent for me.

Thanks for the help

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.