Recomended way to check the status of stream(s) #337
-
Hi. I am experimenting on a script based on the "stream_everything" example. It creates multiple streams, with multiple-channel/market subscriptions. I 'm also using a custom stream-data-processor based on the "process_streams" example. What is the best practice to check that 1) a specific stream is actually created and ready 2) all streams are ready. Same need goes when I subscribe/unsubscribe to addition markets. I guess the answer relies on all these {"result":null,"id":1} messages, but I don't know how to distinct which stream-id is each one of the for. I wonder if there is a recommended and easy approach to this... |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
Hello! Basically:
There are ways to check or query the current status and you can be informed about status changes with stream signals - as buffer or callback. I have put all the info you need in the documentation. Use the docs internal search function and have a look at the topics, monitoring, get_results_from_endpoints(), get_results_from_endpoints() and stream_labels. If you go through the readme once from top to bottom, it will present and link to everything relevant from UBWA. I plan to release a Medium article and YouTube video on this topic soon (mastering ubwa). You can follow me there, then you will be informed about the publication. First the article will appear, then the video. |
Beta Was this translation helpful? Give feedback.
-
@oliver-zehentleitner thank you for your answer. Already subscribed and looking forward for your Medium article. BTW and since you mentioned "once a stream has been created and worked": |
Beta Was this translation helpful? Give feedback.
-
there are different approaches here. Firstly, you can activate exceptions if a stream cannot start. then you have the stream signals. The "result" message should also be a good indication. you could also query the subscriptions with get_stream_subscriptions() after wait_till_stream_has_started() returns true. A mapping from "subscriptions and confirmed subscriptions" would be nice, but is not implemented. |
Beta Was this translation helpful? Give feedback.
there are different approaches here.
Firstly, you can activate exceptions if a stream cannot start. then you have the stream signals. The "result" message should also be a good indication. you could also query the subscriptions with get_stream_subscriptions() after wait_till_stream_has_started() returns true.
A mapping from "subscriptions and confirmed subscriptions" would be nice, but is not implemented.