When I subscribe to changes in events of a user (here, a meeting room), I want to receive notifications in specific scenarios only:
- The event is created.
- The event is deleted.
- The start time or end time of the event is updated.
Problem : My endpoint receive multiple (useless) updated notifications, which are not related to time changes.
--> My endpoint is triggered up to 10 times more because of that.
How do we avoid unwanted updated change notifications ?
Solutions found that did not fixed my problem :
- Accept to receive all update notifications and filter in my code : My function is triggered 10x more than what is needed, with a call to my db to check start or end or changeKey each time.
- Use OData filter during subscription : Seems to be useless without call to my db to have previous values.
Classic subscription used :
{
"changeType": "created,deleted,updated",
"notificationUrl": "{{sync-service-url}}",
"resource": "/users/{userId}/events?$select=start,end,organizer,isCancelled",
"includeResourceData": true,
"encryptionCertificate": "{{encryptionCertificate}}",
"encryptionCertificateId": "ID TEST",
"expirationDateTime": "2023-11-15T22:11:09.952Z",
"clientState": "secretClientState"
}
Than you for your help !