-->

How to Close a Streaming Subscription for a partic

2019-08-21 01:58发布

问题:

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.