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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
44 10 13 14

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 512.0 KiB each and 1.0 MiB total.

@pradeep.badoni

Hi,

Thank you for your participation in the forum.

Is the reply below satisfactory in answering your question?

If yes please click the 'Accept' text next to the reply. This will guide all community members who have a similar question.

Otherwise please post again offering further insight into your question.

Thanks,

AHS

Please be informed that a reply has been verified as correct in answering the question, and has been marked as such.

Thanks,


AHS

Upvotes
Accepted
22.1k 59 14 21

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 512.0 KiB each and 1.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 10 13 14

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 512.0 KiB each and 1.0 MiB total.

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.