English 中文(简体)
WCF / MSMQ "time-to-be-received has elapsed" dead letter queue issue
原标题:
  • 时间:2009-11-18 13:18:36
  •  标签:
  • wcf
  • msmq

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 -->
...

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).

最佳回答

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":

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.

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

问题回答

I m not 100% sure, but I believe that the TimeToLive property only sets the Time-To-Reach-Queue msmq property, but I don t know of a built-in way right now of setting the Time-To-Be-Received property...





相关问题
WCF DataMember Serializing questions

Ok, so I was part way through the long winded process of creating DTOs for sending my model over the wire and I don t feel like I m going down the right route. My issue is that most of the entities ...

Access WCF service on same server

I have a .NET website with a WCF service. How do I access the current operations context of my service? One possible work around is to just make a call to the service within the app...but that seems ...

WCF binding error

So I got into work early today and got the latest from source control. When I try to launch our ASP.NET application, I get this exception: "The binding at system.serviceModel/bindings/wsHttpBinding ...

The service operation requires a transaction to be flowed

I am facing strange issue with our WCF service. The same code was working fine until recently we added more OperationContracts(Web Methods). We have common 3 tier architecture. DAL (WCF) BLL Web ...

热门标签