I am currently using EWS Managed API to subscribe users to Pull Notification on Exchange 2010 server to get notification on Calendar items, and it is working fine. How I did this is I retrieved a list of users with their email from a SQL database and then loop through each of them and subcribe each of them to Pull Notification using SubscribeToPullNotifications()
and then GetEvents()
. I subscribe to events Created
, Modified
and Deleted
on folder Calendar.
I am thinking will that be other better way to get all the notifications from Exchange server besides looping every users one by one, because at any given time, not all users have notifications, only user where if they create, update or delete items in their calendar in MS Outlook will have event fired from Exchange server.
For example, there are 200 users retrieved from SQL database, but only 10 of them are creating new appointment in MS Outlook, but because I am looping each of them, I need to have 200 looping to get the 10 notifications from that 10 users.
Is there a way to get all notifications from the Exchange server at once at any give time so that there is no need to loop through all users to see whether there is any event from the Exchange server? I know maybe it might be better to use Push or Streaming Notification, but I would like to know is there any better way to do this using Pull Notification?
Thanks.