WCF/MSMQ“已经过了接收时间"死信队列问题 [英] WCF / MSMQ "time-to-be-received has elapsed" dead letter queue issue

查看:72
本文介绍了WCF/MSMQ“已经过了接收时间"死信队列问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在针对我编写的某些软件进行测试.该测试通过WCF将消息排入MSMQ的速率比我的软件可以将其出队和处理的速度快.这应该不是问题,因为这是MSMQ的预期目的,但是如果我将足够多的消息排队到需要花费我的软件超过24小时才能处理的位置,这些消息将被移至"事务性死信"消息中"队列,并将其班级设置为"已过待接收时间".

I'm doing testing against some software I've written. The test enqueues messages into MSMQ via WCF at a rate faster than than my software can dequeue and process them. This shouldn't be a problem, since that is MSMQ's intended purpose, but if I enqueue enough messages to where it's taking my software more than 24 hours to process, those messages will get moved to the "Transactional dead-letter messages" queue and have their Class set to "The time-to-be-received has elapsed".

我能找到的唯一可配置的是绑定本身:

The only configurable that I can find is on the binding itself:

<bindings>
  <netMsmqBinding>
    <binding timeToLive="7.00:00:00" /> <!-- 7 days -->
...

我在入队和出队时都使用此绑定,但似乎并没有解决问题.将该值设置为2秒确实有效,但是将其设置为超过1天,包括设置为最大值(24天),则无效.

I use this binding both when enqueuing and dequeuing and it doesn't seem to do the trick. Setting the value 2 seconds does have an effect, but setting it longer than 1 day, including to its max value (24 days) does not.

还有另一种方法来延长此接收时间窗口吗?我找不到其他要配置的内容(发送消​​息或创建队列时).

Is there another way to lengthen this time-to-be-received window? I can't find anything else to configure (when sending the message or creating the queue).

推荐答案

绑定本身上的 timeToLive 属性实际上是唯一可配置的.我回顾了所有配置,显然错过了一个位置.从对WCF服务进行编程"中:

The timeToLive attribute on the binding itself is, in fact, the only configurable necessary. I went back through all my configurations and apparently missed a spot. From "Programming WCF Services":

仅TimeToLive属性 与发布客户相关,并且 对服务端没有影响,也没有 服务可以更改它.生存时间 默认为一天.

The TimeToLive property is only relevant to the posting client, and has no affect on the service side, nor can the service change it. TimeToLive defaults to one day.

我已经在整个周末进行了测试,处理了1,000,000条消息.死信队列中什么都还没有结束.

I've had the test running all weekend now, progressing 1,000,000 messages. Nothing has ended up in the dead-letter queue yet.

这篇关于WCF/MSMQ“已经过了接收时间"死信队列问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆