MSMQ 在发生错误之前仅尝试接收消息 3 次
我的队列中有一些消息。现在我注意到,尝试 3 次后,服务主机出现故障。这是正常行为吗? 3次从哪里来?我以为它来自 receiveRetryCount。但我将其设置为 1。
我的队列中有 20 条消息等待处理。负责处理消息的 WCF 操作支持事务,因此如果它无法处理消息,它将抛出异常,以便消息保留在队列中。
我不认为经过多次重试后,ServiceHost 会出现故障,这部分是否记录在某处?
我在我的 winxp 机器上运行 MSMQ 服务。
我更感兴趣的是表明服务主机在多次重试后会出现故障的文档。这部分内容是真的吗?
I have some messages in my queue. Now I notice that after 3 tries the service host faults. Is this a normal behavior? Where does the 3 times comes from? I thought it came from receiveRetryCount. But I set that one to 1.
I got 20 messages in my queue waiting to be processed. The WCF operation that is responsible to process the message supports transaction so if it can't process the message it will throw so that the message stays in the queue.
I didn't think that it would of Fault the ServiceHost after a number of retry, is this part documented somewhere?
I'm running MSMQ service on my winxp machine.
I'm more interested in documentation indicating that the service host will fault after a number of retry. Is this part true?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我想我找到了它出错的原因。
msmq 绑定上有一个名为 ReceiveErrorHandling 的属性,默认情况下设置为“Fault”,当 receiveRetryCount 达到最大值时,该属性将导致通道侦听器出现故障。
I think I found the reason why it faults.
There a property on the binding of msmq called ReceiveErrorHandling which is by default set to Fault which will fault the channel listener when receiveRetryCount has been maxed out.
不确定这是什么 - 我自己没有直接使用 MSMQ。
但请查看 Tom Hollander 关于 MSMQ、WCF 和 IIS:让它们发挥出色的精彩博客文章系列 (第 1 部分,第 2 部分 和 第 3 部分)。
Not sure what this is - I don't use MSMQ myself first hand.
But check out Tom Hollander's excellent blog post series on MSMQ, WCF and IIS: Getting them to play nice (part 1, part 2 and part 3).