Resume existing connection/session upon reconnect?

I have multiple meteor apps between which I need to keep data synchronized. DDP.connect is great for that, but unfortunately right now every time the apps get disconnected from one another, DDP creates a new connection/session on the publisher side. This means that it will send the entire collection to the subscriber again once reconnected. In my situation that is, unfortunately, prohibitive – I need to be economical about data transfers and dis-/reconnections are frequent.

The docs state that:

Currently when a client reconnects to the server (such as after temporarily losing its Internet connection), it will get a new connection each time. The onConnection callbacks will be called again, and the new connection will have a new connection id.

In the future, when client reconnection is fully implemented, reconnecting from the client will reconnect to the same connection on the server: the onConnection callback won’t be called for that connection again, and the connection will still have the same connection id.

Any hints on how I might be able to get this working already now, i.e., before it is supported by meteor itself? I’ve tried setting manually in the onReconnect handler, but that didn’t do the trick – unsurprisingly.

I have a similar situation that I am trying to find a fix for. Were you able to find a work around to re-pulling the entire collection?

Does anyone know if there are any planned changes to the framework in the near future to support reusing an existing connection?

No, I haven’t. I had to work around it by updating the subscription to only contain recent items, which also required updating the data in the collection itself to contain timestamps.