You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds the topic to the desired subscriptions, eventually subscribes. Does not throw on failure.
Topic is not subscribed when the resulting Task completes, subscription happens eventually.
Suggestion:
Rename IManagedMqttClient.SubscribeAsync(..) to IManagedMqttClient.SubscribeEventuallyAsync / EnqueueSubscribe.
Add IManagedMqttClient.SubscribeImmediateAsync(..) that only returns after a subscription has been established. This functionality is currently completely missing from the Managed Client. While it can be implemented by observing the SubscriptionsChangedAsync event it would be nice to have a clear distinction between subscribing now and subscribing eventually.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Confusing difference in behaviour between the
IMqttClient
andIManagedMqttClient
:IMqttClient.SubscribeAsync(..)
Immediately subscribes to a topic, exception on failure.
Topic is subscribed when the resulting task completes.
IManagedMqttClient.SubscribeAsync(..)
Adds the topic to the desired subscriptions, eventually subscribes. Does not throw on failure.
Topic is not subscribed when the resulting Task completes, subscription happens eventually.
Suggestion:
Rename
IManagedMqttClient.SubscribeAsync(..)
toIManagedMqttClient.SubscribeEventuallyAsync
/EnqueueSubscribe
.Add
IManagedMqttClient.SubscribeImmediateAsync(..)
that only returns after a subscription has been established. This functionality is currently completely missing from the Managed Client. While it can be implemented by observing the SubscriptionsChangedAsync event it would be nice to have a clear distinction between subscribing now and subscribing eventually.Beta Was this translation helpful? Give feedback.
All reactions