I need to notify on events in thousands of mailboxes to another system, I've created a pull notification subscription and it works great, I've created several of them but I need to GetEvents() from each one separately, then I read this article How to: Maintain affinity between a group of subscriptions and the Mailbox server in Exchange in the MSDN, it says I need to add headers to the subscriptions then I'll be able to getEvents() for all of them in one request, using the EWS managed API it should look like this:
service.HttpHeaders.Add("X-AnchorMailbox", Mailbox.SMTPAddress);
service.HttpHeaders.Add("X-PreferServerAffinity", "true");
Then I should get back a cookie in the response:
X-BackEndOverrideCookie
I don't see the cookie in the response and I did not find anything in the article regarding how to obtain and use it in the EWS managed API (except those two lines above all the rest of the article is based on XML requests which I don't really like). besides that as far as the request it should include all the subscriptions id's (as seen in the XML) and for this I did not find a solution in the EWS managed API too. I've made this with the streaming notification solution but I would like to work with Pull notifications.
If anyone has any experience with this I would love to hear. Thanks in advance for the time you took in reading this and for your answers in case you've answered.