有没有办法查看 NServiceBus 当前存在哪些订阅

发布于 2025-01-06 14:36:55 字数 314 浏览 4 评论 0原文

我关心我的 NServiceBus 解决方案。

我有一个“MessageHub”,它发布一些非常重要的消息。但有时它会失去订阅的踪迹并丢弃消息,因为它认为没有人在听。

我尝试打开“NServiceBus.Integration”来存储订阅。但尽管如此,我仍然遇到启动顺序错误的问题,它认为没有任何东西在监听。

有没有办法调试这个过程?尝试找出为什么会变得混乱?

我什至不知道如何查看它“认为”拥有哪些订阅...

我选择了 NServiceBus,因为它不应该丢失数据。现在我正在失去大卡盘。我知道这是一个配置问题,但它引起了很多悲伤。

I am concerned with my NServiceBus solution.

I have a "MessageHub" that publishes some very important messages. But sometimes it loses track of its subscriptions and just discards the message because it thinks no one is listening.

I have tried turning on "NServiceBus.Integration" to store the subscriptions. But despite that, I still have issues with bad start up order where it thinks nothing is listening.

Is there a way to debug this process? Try to figure out why it is getting confused?

I don't even know a way to look at what subscriptions it "thinks" it has...

I went with NServiceBus because it is not supposed to lose data ever. Now I am losing large chucks. I know it is a config issue, but it is causing much grief.

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

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

发布评论

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

评论(2

嘿哥们儿 2025-01-13 14:36:55

在您的情况下,可能发生的情况是您正在使用 MSMQ 进行订阅存储。尽管订阅可能会持续一段时间,但使用 MSMQ 长期存储内容总是会不稳定。

对于持久订阅存储(“永远”存在),您应该使用 SQL Server 作为订阅存储。

注意:无论您使用 sql 还是 msmq 存储当前订阅,您始终可以查看它们。在 SQL 中,只需查看订阅表,并在发布者的订阅队列中查找 msmq。

更新

从版本 3 开始,我一直使用默认的 RavenDb。

What is probably happening in your case is that you are using MSMQ for subscription storage. Even though it's possible for subscriptions to endure for a while, using MSMQ to store things long term is always going to be volatile.

For durable subscriptions storage (which survive "forever") you should be using SQL server as your subscription storage.

Note: You can always view your current subscriptions whether you are using sql or msmq to store them. In SQL just look in the subscriptions table and for msmq look in the publisher's subscription queue.

UPDATE

Since version 3 I have been using RavenDb which is the default.

潦草背影 2025-01-13 14:36:55

根据我的经验,要正确分配订阅,应该首先启动 EventHandler 项目,然后当它们全部空闲时启动 CommandHandler(发布者)。

您可以使用 Service Bus MQ Manager 查看正在订阅哪些消息,它有一个对话框列出所有“消息”及其订阅者/发布者。我的一个业余项目,它是免费且开源的。
http://blog.halan.se/page/Service-Bus-MQ -Manager.aspx

In my experiance, to get the subscriptions assigned correctly, one should first start the EventHandler projects and then when they are all idle, start the CommandHandlers (Publishers).

You can see what messages are being Subscribed to using Service Bus MQ Manager, it has a dialog listing all "messages" and their subscribers/publishers. A side project of mine, its free and open sourced.
http://blog.halan.se/page/Service-Bus-MQ-Manager.aspx

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