Publish / Subscribe

Hello I have appx 10000 record in mongo db collection . I am using Meteor Publish and Subscribe .

Server Side
Meteor.publish(“GetLogsByOrganization”,function (TenantId,limit) {
let ApplicationLog_= ApplicationLog.find({ “TenantId”:TenantId });
if(ApplicationLog_)
return ApplicationLog_;
this.ready();
});

Client Side.

const _templateInstance=Template.instance();
Tracker.autorun(function(){
let _isReady= Meteor.subscribe(“GetLogsByOrganization”,app.cl().tc.TenantId);
if(_isReady){
console.log(ApplicationLog.find({}).count());
_templateInstance.alllogs.set(ApplicationLog.find({}).fetch());
_templateInstance.thislogs.set(ApplicationLog.find({},{sort:{“DateTime”: 1 },limit:_templateInstance.LogosLimit.get()}).fetch());
}
});

It returning data partially not at once. I need return data at once . Please help me to resolve the same issue. I have attached a console screen shot alos.

You should try if(_isReady.ready()){}

Meteor.subscribe returns a handle, which has a ready() function https://guide.meteor.com/data-loading.html#subscriptions

Yes it working , thanks