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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
44 6 10 12

WebSocket API - Keep getting message - stream is closed.

Hi Team,

Need your help.

We have deployed the Latest WebSocket API solution in one of our client's production and we are not able to receive rates as we are keep getting message "Stream is closed" and nothing is happing.

We were not handling this case in the application but I am thinking to add a retry logic where I again create connection and start sending the login request.

Questions for you:

Why we are getting Stream is closed message?

If a retry need to be implemented, how much time I need to wait before retrying and how many time we need to retry?

Appreciate your help in advance.

Note: This is not happing when we start the application, it happened randomly during the day.

Let me know if you need more detail.

Thanks

Pradeep B





websocketsrrtorefinitiv-realtime-optimised
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
13k 32 12 18

Hi @pradeep.badoni,

There are many reasons for this issue - it could be network disruptions, or failure to renew the token in time etc. To eliminate these, can you:

1. Try to run the service discovery example from the same machine and see if it experiences similar disruptions.

2. Capture the raw network packets for analysis.


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.

Hi Gurpreet,


Could you please help me on point #2, on how to capture the raw network packets for analysis.

Are you looking for the JSON message or something else?

Thanks

Pradeep B

Hi Pradeep,

Start with service discovery sample first.

For captures start from the simple one and capture the raw JSON messages with timestamp from your application.

You might need to use Wireshark to capture network packets - but for that you will need to open a service ticket with Refinitiv support who can look at network logs at server side and compare them to your network traffic.

Upvotes
44 6 10 12

Hi Team,

We are trying the check with Refinitiv Support team. Till this point we didn't get any response.

I will update the thread once have some update from Refintiv support.

I did added a retry logic when we get "stream is closed" message and we are going to deploy this solution in client production and see what happened.

In my local testing the retry logic is working as expected and able to start the communication again.

Thanks

Pradeep B

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