简体   繁体   English

在发生错误之前,MSMQ仅尝试3次接收消息

[英]MSMQ only tries 3 times to receive a message before an error occurs

I have some messages in my queue. 我的队列中有一些消息。 Now I notice that after 3 tries the service host faults. 现在,我注意到经过3次尝试后,服务主机出现了故障。 Is this a normal behavior? 这是正常现象吗? Where does the 3 times comes from? 3次来自哪里? I thought it came from receiveRetryCount. 我以为它来自receiveRetryCount。 But I set that one to 1. 但是我将其设置为1。

I got 20 messages in my queue waiting to be processed. 我的队列中有20条消息等待处理。 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. 负责处理消息的WCF操作支持事务处理,因此如果无法处理消息,它将抛出该消息,以使消息保留在队列中。

I didn't think that it would of Fault the ServiceHost after a number of retry, is this part documented somewhere? 在多次重试后,我认为ServiceHost不会出错,这部分是否记录在文件中?

I'm running MSMQ service on my winxp machine. 我在winxp机器上运行MSMQ服务。

I'm more interested in documentation indicating that the service host will fault after a number of retry. 我对说明在多次重试后服务主机将出现故障的文档更感兴趣。 Is this part true? 这部分是真的吗?

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绑定上有一个名为ReceiveErrorHandling的属性,默认情况下将其设置为Fault,当receiveRetryCount达到最大值时,它将使通道侦听器出现故障。

Not sure what this is - I don't use MSMQ myself first hand. 不知道这是什么-我不亲自使用MSMQ。

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 ). 但是请查看Tom Hollander撰写的关于MSMQ,WCF和IIS的优秀博客文章系列:让他们玩的很好第1 部分第2 部分第3部分 )。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM