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
I notice the subscribe client when being closed/shutdown, it will loop a map[string]subscription and wait to close each subscription. How about if we subscribe to the same topic a couple of times in one app which could be possibly done through different modules? Then we will override the subscription in the map with the same topic and we won't gracefully shutdown.
type struct subscriptionEntry {
topic string
subscription *stan.Subscription
}
A slice []subscriptionEntryt might be good enough instead of a map.
How to do unsubscribe? I know in most cases, we do not need to.
The text was updated successfully, but these errors were encountered:
weidonglian
changed the title
Potential shutdown subscriptions
Potential shutdown subscriptions leaks
Dec 11, 2020
I notice the
subscribe
client when being closed/shutdown, it will loop amap[string]subscription
and wait to close each subscription. How about if we subscribe to the same topic a couple of times in one app which could be possibly done through different modules? Then we will override the subscription in the map with the same topic and we won't gracefully shutdown.type struct subscriptionEntry {
topic string
subscription *stan.Subscription
}
A slice
[]subscriptionEntryt
might be good enough instead of a map.How to do unsubscribe? I know in most cases, we do not need to.
The text was updated successfully, but these errors were encountered: