I'm using subs-manager, but the answer to this may be independent of that lib.
I have a subscription with a single limit
argument. Currently, when I call subs.subscribe 'subname', newLimit
, another subscription is added.
The old subscriptions are still there. I don't want Meteor to spend time maintaining the old, lower-limit subscriptions. Instead of adding a new subscription, I want to update the argument of the old subscription. What is the best way to do this?
Note that I also don't want to completely tear down eg 'subname', 20
before subscribing to 'subname', 40
, because I don't want Meteor to do the extra work of resending the first 20 docs – I want it to just send docs 21 - 40.
You could have a look at your subscription's
stop()
method. According to the docs:So the way I see it, you could maybe manage to do: