Has any one successfully configured Mircoservices with Meteorhacks:cluster on Modulus ?
I am trying to figure out why Subscribe is not working. Method calls from server side code works.
I posted this question on SO. no replies yet. I am posting it here.
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.
//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){
console.log(e); //No errors either
if(!e)
doSomething();//Never gets called
});
//server1/publish.js
Meteor.publish("contentDocuments", function(){
return ContentLibrary.find({});
}
ContentLibrary collection on the client2 is never populated.
Our apps works on Rackspace as expected. Both apps are deployed on the same box, under same domain, different ports
Any help is appreciated.