We are moving our app from Rackspace to Modulus. We have 2 apps configured as microservices using meteorhacks:cluster package. It seems like Meteor Methods (server1 to server2) call is working but Meteor subscription (client2 to server1) is not working. I am trying to figure out if it is a Cross domain request issue.
// https://github.com/meteorhacks/cluster#microservices
//server2/app.js
Cluster.register(process.env.APP_NAME,{endpoint:process.env.ROOT_URL});
mainApp = Cluster.discoverConnection("server1");
Cluster.allowPublicAccess("server1");
//client2/app.js
mainApp = Cluster.discoverConnection("server1");
ContentLibrary= new Meteor.Collection('content_library', {connection:mainApp,idGeneration : 'MONGO'});
//client2/home.js
mainApp.subscribe('contentDocuments','all',function(e){
if(!e)
doSomething();//Never gets called
});
//server1/publish.js
Meteor.publish("contentDocuments", function(){
return ContentLibrary.find({});
}
ContentLibrary collection on the client is never populated.
Our apps works on Rackspace as expected.