Exception when Internet Connection Disconnected #13102
-
Hi, I use the below code for stream data and if the internet connection is broken, the function throws an exception and the streaming process stoped.
|
Beta Was this translation helpful? Give feedback.
Replies: 8 comments 7 replies
-
I'm not sure what do you expect RavenDB to do at this point. You are trying to stream all the records, but you have unreliable connection. The Streaming API is a single continuous operation, any network outage will cause it it be broken. Note that RavenDB offers an API that is meant to handle such disconnect scenario and retry from the last acknowledged location. That is what the Subscription API is for. Would be interesting to understand more about your scenario. |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
when internet is disconnected, stream process throw exception and when net is back stream can not be continue |
Beta Was this translation helpful? Give feedback.
-
i need pause streaming when internet disconnected and when internet is back streaming resume again |
Beta Was this translation helpful? Give feedback.
-
when throwing exception, my app can not continue streaming even run function again and for continue must be reset |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
this my function, and when catch run function from last record started, but streaming not started |
Beta Was this translation helpful? Give feedback.
-
You can do something like this:
|
Beta Was this translation helpful? Give feedback.
I'm not sure what do you expect RavenDB to do at this point. You are trying to stream all the records, but you have unreliable connection. The Streaming API is a single continuous operation, any network outage will cause it it be broken.
Note that RavenDB offers an API that is meant to handle such disconnect scenario and retry from the last acknowledged location. That is what the Subscription API is for.
Would be interesting to understand more about your scenario.