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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
10 3 1 3

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 5.0 MiB each and 10.0 MiB total.

Upvotes
Accepted
11.5k 16 7 10

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 5.0 MiB each and 10.0 MiB total.

Upvotes
13k 32 12 18

@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 5.0 MiB each and 10.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
13k 32 12 18

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 5.0 MiB each and 10.0 MiB total.

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

Upvotes
13k 32 12 18

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 5.0 MiB each and 10.0 MiB total.

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

Upvotes
13k 32 12 18

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 5.0 MiB each and 10.0 MiB total.

Click below to post an Idea Post Idea