$meteor --version
Meteor 1.8
I have a Meteor.publish(“xxx”) on server-side that just returns a cursor from a Meteor.Collection.find. On client-side I do Meteor.subscribe(“xxx”, … , { onReady: onReadyCallback}). Shortly after setup onReadyCallback is called on the client-side, after all the data from the cursor has been propagated to my client mini-mongo. That is as expected.
Now if I make a change on server-side-mongo, to one of the records included in the cursor, I will get another call to onReadyCallback, after the change has been propagated to client-side. I was not expecting that as https://docs.meteor.com/api/pubsub.html#Meteor-subscribe only says “The onReady
callback is called with no arguments when the server [marks the subscription as ready]” and “marks the subscription as ready” says “Informs the subscriber that an initial, complete snapshot of the record set has been sent.”. I notice the word “initial”, and therefore do not expect onReady to be called on consecutive changes to the record set. I expected that I had to do an observe on a client-side mini-mongo-cursor, in order to get informed about the after-initial-snapshot changes to the record set.
Is it me who misread the semantics of onReady, or is it the implementation that is incorrect, or the documentation that is incorrect?