3
votes

I'm trying to create a project to listen to events in the Exchange room mailbox using EWS service.

If we need to monitor 20k mailboxes then we need to create 20k open connections. Instead of that EWS allow us to create a batch connection up to 200 mailboxes in each group. So In case of monitoring 20k mailboxes, we only need 100 connections to listen to all mailboxes.

I just want to know which criteria used for this mailbox grouping?. Can we group these mailboxes externally?

We can get group info by passing mailbox id to method "GetUserSettings"

public GetUserSettingsResponse GetUserSettings(string userSmtpAddress, params UserSettingName[] userSettingNames);

Any help is appreciated

1

1 Answers

0
votes

If you can get grouping info from GetUserSettings, then all of the SMTPs on the connection should have the same group. As I recall, grouping info only matters when you are going against Exchange Online, so an on-prem Exchange will usually send back empty grouping info, in which case you're free to add SMTP subscriptions as you please on the connection, subject to the 200 limit. (I've not verified whether this is still true in E2019, but probably, since grouping info seems to be identifying the back-end servers in the O365 infrastructure.)

BTW, I probably should mention, and you've probably seen this, that for new code one should be using the Graph API rather than EWS. However it seems to me that Change Notifications in Graph are modeled on Push Notifications in EWS, not Streaming Notifications, so there may be some network impediments to using Graph notifications.