DDP between two servers doesn't reconnect

前端 未结 3 566
感动是毒
感动是毒 2021-01-14 23:57

I have two meteor applications connected via DDP on different servers and server A send data to server B. This is the way they work.

Server A



        
3条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-15 00:07

    I think you are not passing DDP connection object to the Collection correctly, try:

    var remote = DDP.connect('http://server-a/');
    Items = new Meteor.Collection('items', { connection: remote }); 
    

    It might be useful for debugging to try all these connection games from the browser console first, since Meteor provides the same API of connection/collections on the client (except for the control flow). Just open any Meteor application and try this lines from the console.

提交回复
热议问题