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
Is your feature request related to a problem? Please describe.
Currently, when I subscribe to a topic more than once it requires only one unsubscribe call to actually stop receiving messages on given topic.
In a large app, that multiple modules may want to listen to some topics on demand, but stop subscription whenever that's not needed anymore.
Describe the solution you'd like
If I subscribe to given topic more than once, it should require exactly the same amount of unsubscribe calls to actually stop for listening to given topic.
Describe alternatives you've considered
Alternative library, if one exists.
Additional context
This is slightly related to #1951 as well, which is another pain point of mqtt.js. If I'd like to create such a wrapper described in the issue - I would bump into problem described here if I'd want to unsubscribe. I'd need to count subscriptions myself and basically wrap the whole library (overridding functions) to make it safe to use with any code.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
Currently, when I subscribe to a topic more than once it requires only one unsubscribe call to actually stop receiving messages on given topic.
In a large app, that multiple modules may want to listen to some topics on demand, but stop subscription whenever that's not needed anymore.
Describe the solution you'd like
If I subscribe to given topic more than once, it should require exactly the same amount of unsubscribe calls to actually stop for listening to given topic.
Describe alternatives you've considered
Alternative library, if one exists.
Additional context
This is slightly related to #1951 as well, which is another pain point of mqtt.js. If I'd like to create such a wrapper described in the issue - I would bump into problem described here if I'd want to unsubscribe. I'd need to count subscriptions myself and basically wrap the whole library (overridding functions) to make it safe to use with any code.
The text was updated successfully, but these errors were encountered: