订阅队列时 nServiceBus MSMQ 错误

发布于 2024-09-09 05:04:27 字数 967 浏览 1 评论 0原文

这可能是非常明显的事情,我刚刚开始使用 nSB。我会尽力做到详细。让我们从代码开始:

这是端点配置代码: http://www.pastebin.ca/1896246

和 app.config: http://www.pastebin.ca/1896249

最后,这是我运行 NServiceBus 时记录的输出.Host.exe http://www.pastebin.ca/1896253

奇怪的是总线仍然可以工作并且可以接收消息和处理它们,正如我在这里看到的: http://www.pastebin.ca/1896257

我担心的最后一件事是我被重复了主机进程运行时出现 System.Messaging.MessageQueueException 错误:

请求的操作超时 已过期

消息队列错误代码: System.Messaging.MessageQueueErrorCode.IOTimeout

堆栈跟踪:位于 System.Messaging.MessageQueue.ReceiveCurrent(时间跨度 超时、Int32 操作、CursorHandle 游标、MessagePropertyFilter 过滤器、 消息队列事务 内部交易, 消息队列事务类型 交易类型)

This may be something terribly obvious, I am just getting started with nSB. I will try to be as detailed as I can be. Lets start with the code:

Here is the endpoint configuration code:
http://www.pastebin.ca/1896246

And the app.config:
http://www.pastebin.ca/1896249

Finally here is the output being logged when I run NServiceBus.Host.exe
http://www.pastebin.ca/1896253

Oddly enough the bus still works and can receive messages and process them, as I see here:
http://www.pastebin.ca/1896257

The last thing that concerns me is that I get repeated System.Messaging.MessageQueueException errors while the host process is running:

Timeout for the requested operation
has expired

MessageQueueErrorCode:
System.Messaging.MessageQueueErrorCode.IOTimeout

StackTrace: at
System.Messaging.MessageQueue.ReceiveCurrent(TimeSpan
timeout, Int32 action, CursorHandle
cursor, MessagePropertyFilter filter,
MessageQueueTransaction
internalTransaction,
MessageQueueTransactionType
transactionType)

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

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

发布评论

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

评论(2

翻了热茶 2024-09-16 05:04:27

您无需担心这些 MSMQ 异常,因为它们是 NServiceBus 内部的并被框架吞没。

You don't need to worry about those MSMQ exceptions as they are internal to NServiceBus and are swallowed by the framework.

幽梦紫曦~ 2024-09-16 05:04:27

从异常来看,您似乎正在执行超时接收。如果没有消息要接收,那么当达到超时时,MSMQ 最终将生成异常。如果这是预期的情况(即队列中没有消息),您只需捕获异常并继续。如果队列中始终有一条消息,那么我会对光标当时指向的位置感兴趣。

干杯
约翰·布瑞克威尔

From the exception it looks like you are performing a receive with a timeout. If there is no message to receive then MSMQ is going to eventually generate an exception when the timeout is reached. You just need to catch the exception and move on if this is an expected scenario (i.e. no message in the queue). If there is ALWAYS a message in the queue then I would be interested in where the cursor is pointing at the time.

Cheers
John Breakwell

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