kadirahq / subs-manager

Subscriptions Manager for Meteor
MIT License
358 stars 36 forks source link

Pattern for updating a subscription limit argument #44

Open lorensr opened 9 years ago

lorensr commented 9 years ago

I have a subscription with a single limit argument. Currently, when I call subs.subscribe 'subname', newLimit, another subscription is added.

image

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.

lorensr commented 9 years ago

This can be done without subs-manager: http://stackoverflow.com/questions/30722862/efficient-pattern-for-updating-a-subscription-limit-argument