EWS 托管 API:PullSubscription - 取消订阅调用是否足够?

发布于 2024-12-11 18:13:00 字数 542 浏览 5 评论 0原文

我们正在对大量使用 EWS 的应用程序进行一些优化,其中一点是清理不再需要的订阅。我们使用 PullSubscription 类型,所以我做的第一件事自然是确保每个应删除的订阅都有一个 Unsubscribe 方法调用。

令我惊讶的是,根据 Exchange 性能计数器,取消订阅调用后的订阅数量仅减少了几个订阅,而不是 0(出于测试目的,我对所有开放订阅调用取消订阅)。就像我们有 200 个邮箱,每 3 个订阅(每个订阅对应不同类型的项目:电子邮件、约会等),相当于 600 个活跃订阅。在取消订阅呼叫(全部 600 个)之后,计数器显示只有 10 个左右的订阅被删除。如果我们运行我们的应用程序几次,订阅数量每次都会增加。

那么 Exchange 是否会以某种方式缓冲或延迟或对这些订阅执行任何操作?取消订阅调用是否足够,或者我应该做一些额外的事情来确保订阅被删除并且不会挂在服务器上消耗资源?或者可能与服务器配置以及 EWS 服务如何工作有关?

当然,与大多数其他情况一样,EWS 文档对此非常直言不讳(这意味着只有基本的类参考,没有可能的问题解决方案,对解决问题没有任何用处),所以我希望这里有人能给我一些提示。

We are doing some optimization of our app that heavily uses EWS and one point is about cleaning subscriptions that are no longer needed. We are using PullSubscription type so naturally first thing I did was to make sure there is a Unsubscribe method call for each of subscriptions that should be removed.

To my surprise according to Exchange performance counters number of subscriptions after Unsibscribe calls decreases only by several subscriptions not to 0 (for testing purposes I call Unsubscribe for all of open subscriptions). Like we have 200 mailboxes, for each 3 subscriptions (each for different kind of items: emails, appointments, etc.) which equals 600 active subscriptions. And after Unsubscribe calls (for all 600 of them) counters show that only 10 or so subscriptions were removed. If we run our app few times number of subscriptions grows each time.

So does Exchange somehow buffer or delay or do whatever with those subscriptions? Is Unsubscribe call enough or should I do something additional to be sure that subscription is removed and not hanging on server eating resources? Or maybe it is something about config of server and how EWS service works?

Of course EWS documentation is so vocal about it as in most other cases (which means only basic class reference, no possible problems solutions, nothing useful in solving issues) so I hope somebody here will throw me some hints.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

不一样的天空 2024-12-18 18:13:00

您只能取消所有订阅。 Exchange 应该处理这个问题并随着时间的推移丢弃旧的订阅......

You cannot do more than unsubscribe from all subscriptions. Exchange should handle that and discard old subscriptions over time...

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文