0

Having some problems with DDP at the moment. All is pretty much working perfectly accept for one issue. I have a collection where I am observing the changes. When I call sub on it initially it sends all the data down through added .. (i get that). However when I update the same collection by adding a new record observe changes is called twice and then the whole collection is sent once again instead of just the delta (ie the new added record).

Is there any reason why this could be happening. The code is pretty much like the standard count example accept that when I console log inside the added function it prints out the same id twice, then a few seconds later sends the whole data set back down. There is only one client connected to it so it isn't another client.

When I debug the client i can see that twice the records are sent. The client is an android implementation of DDP.

Any help would be greatly appreciated.

1 Answers1

0

Sounds like the subscription is getting stopped and started again. May be a reconnect issue. I would recommend using the ddp-analyzer-proxy to see what's being sent over the wire.

There are two java implementations of DDP clients that I know of:

Are you using one of those?

alanning
  • 5,198
  • 2
  • 34
  • 33