如何取消订阅NServiceBus?
如果我选择在NServiceBus pub sub模型中使用自动订阅,当客户端存在时系统不会自动取消订阅。
我始终可以手动取消订阅,但我无法确定现有的订阅列表,并且我不想对取消订阅进行硬编码。
所以我的问题是:nservicebus中有自动取消订阅的功能吗?如果没有,我如何获取客户当前订阅的列表?
If I choose to use the auto subscription in NServiceBus pub sub model, the system does not auto unsubscribe when the client exists.
I can always do a manual unsubscribe, but I having trouble figuring out the existing list of subscriptions and I don't want to hard code the unsubscribe.
So my question is: is there an auto-unsubscribe function in nservicebus? If not, how can I get a list of current subscriptions for a client?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为您不会找到自动取消订阅的功能。 Udi 和公司有意设计 NServiceBus,使其难以执行不适合异步、发布/订阅 SOA 模式的操作。一般来说,客户端是否运行并不会影响订阅是否仍然有效。如果这确实是您所需要的,您可能需要自己编写代码。
I don't think you are going to find an auto-unsubscribe. Udi and company have intentionally designed NServiceBus to make it hard to do things that don't fit the async, pub/sub SOA pattern. Generally, the fact that the client is running or not running would not affect whether or not the subscription is still valid. If that is really what you need, you'll probably have to code that in yourself.