问题
I have a EWS Managed API code running with multiple streaming subscriptions.
I want to terminate (or restart) the connection to a specific mailbox on the basis of some conditions.
How to use the connection.close()
(or any other way) to close a particular subscription id?
Any idea how to force close a streaming subscription connection?
回答1:
Connections can contain one more more Mailboxes depending on how your doing affinity. You just close the connection the mailbox is in itself https://docs.microsoft.com/en-us/dotnet/api/microsoft.exchange.webservices.data.streamingsubscriptionconnection.close?view=exchange-ews-api . Then remove the Subscription for that mailbox and restart the connection.
来源:https://stackoverflow.com/questions/52178314/how-to-close-a-streaming-subscription-for-a-particular-mailbox-in-ews-api