-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Closed
Labels
good first issueGood for newcomersGood for newcomersresolution: invalidThis doesn't seem right and might not belong here.This doesn't seem right and might not belong here.type: documentationImprovements or additions to documentationImprovements or additions to documentation
Description
Hey I've noticed that calls to subscribeToTopic
and unsubscribeFromTopic
take a long time to complete. (the Future
s they return take long). Calls to them when device is disconnected from the network usually never complete and sometimes until device is reconnected.
My questions around this is as below
- Is it expected that application code
await
s these calls? - If multiple calls are made to these functions, does the library maintain the order they were called?
- For example, if the application does not
await
these calls (i.e from a Settings page where the user may click through a lot of options and don't want to wait 45 seconds for each click or if the device is disconnected). In this case is the app expected to wait before the next call? - Another example is if the app wants to "reset" the subscriptions with unsubscibing from a list of subs, then subscribing again for a subset. In this case should the app await all calls to
unsubscribeFromTopic
before callingsubscribeToTopic
or is the package handle ordering?
- For example, if the application does not
- If the device is disconnected at the time of these calls and the app is terminated, are the calls made later when the app is initialized next time?
I'm thinking of "resetting" topic subscriptions in a background handler if a notification was received on a topic the app is not expecting. However since the calls take a long time, and background execution time is limited?, not sure if this is viable.
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomersresolution: invalidThis doesn't seem right and might not belong here.This doesn't seem right and might not belong here.type: documentationImprovements or additions to documentationImprovements or additions to documentation