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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
10 5 3 5

Long-run Websocket Streaming Connection Not Getting Response

Hi, Is there any problems/concerns with a long running stream request? I have many streaming requests, all of which are long-running (more than 24 hours) ones. The responses stop at some point - hours after the connection initiated. Any parameter in the request controls the lifetime of the streaming requests? Thank you!

treprdp-apiwebsocketsrrto
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.

@lzhuang1

Hi,

Thank you for your participation in the forum.

Are any of the replies below satisfactory in resolving your query?

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

Otherwise please post again offering further insight into your question.

Thanks,

AHS

Upvotes
Accepted
24.7k 54 17 14

Hello @lzhuang1

Beside the information requested by my colleague, what is ADS version in your environment?

Can you use the rmdstestclient tool connects to the same ADS and subscribes the same RICs list? The rmdstestclient tool is a general purpose Elektron consumer application for RSSL, SSL and WebSocket connections. You can find how to use rmdstestclient with the WebSocket connection in this article.

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.

Upvotes
22.1k 59 14 21

@lzhuang1,

Can you please provide more information on your setup and what API/programming language you are using. Are you connecting to a local TREP or to Elektron in the cloud. If using the cloud connection, then pay specific attention to refresh token expiry at around 18 hour mark.

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.

I am using python, the request I connect to local TREP. The request I send looks like:

{ "Domain":"MarketPrice", "ID":-100000000000, "Key":{ "Name":[ "GBP=" ], "Service":"IDN_SELECTFEED" }, "Priority":{ "Class":1, "Count":1 }, "Streaming":true, "Type":"Request", "View":[ "BID" ] }

Do you see any problems with it? thanks!

Upvotes
22.1k 59 14 21

There does not seem to be any issue with your request message.

When you say "responses stop" does it mean you stop getting ping messages and the websocket connection terminates?

Is your application responding to the ping messages all the time?

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.

I get the ping/pong heartbeat but no response for GBP= anymore

Upvotes
22.1k 59 14 21

Few side observations:

Are you using multiple instruments? "Name": "GBP=" will also work for single instrument. Putting it in an array will send a batch request.

Why is ID such a big number?

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.

Yes I use multiple instruments, it is a batch request, I display GBP= only for simplicity

Upvotes
22.1k 59 14 21

If you leave it running, does the application start getting data again after while?

Does this happen for all the instruments in the batch, at the same time?

Does the application start getting data, if it is restarted?

What does it show in the the ADS logs?

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.