質問

When building a Exchange sync service there are multiple ways to ensure one stays in sync. In any case one needs to do an initial synchronisation of a folder.

In our case we need to synchronize a set of calendars from Exchange to another system.

I've found that the SyncFolderItems works really well for the initial sync. It also works really well to do periodical syncs to ensure complete consistency, but it doesn't notify of changes as they happen. You get a type of watermark which you can use to get the diff between two syncs.

I've found that the Push Notifications are a really neat way to synchronize on the fly, after you've done the initial sync, but and taht when you have to resubscribe you can use a Watermark to ensure you haven't missed anthing.

Question

Now, if something goes wrong with the notifications and I need to make sure the calendar is consistent, I'd use the SyncFolderItems method to get back in sync, but the watermark I need to pass to that method differs from the watermark I'd gotten from the NotificationService. Is there a way to tell SyncFolderItems that I already processed everything up to the watermark and need the changes that happened after that point?

Or

How else should I reconsolidate?

役に立ちましたか?

解決

My current solution is to use syncfolderitems to retrieve all the changes up to now, then sybscribe using a push subscription. When a change notification comes in, I run SyncFolderItems again with the last watermark from that method.

This way I never have to rely on the push notification subscription and I am always sure that I receive all changes.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top