0
votes

How do I set the message timeToBeRecieved when using an MSMQ WCF client and server?

I am using an msmq service to manage messaging to an unreliable target system. Messages can remain undelivered for days.

Most of the invalid messages go into a poison queue using the setting below in the server binding.

receiveErrorHandling="Move"

Some messages are ending up in the system dead letter queue rather than in the poison queue. Is there a way to configure the dead letter messages to go into the same queue as above? The queue is a sub-queue of the actual message queue called queue;poison.

How do I set the timeToBeReceived to a sufficiently large value that the messages eventually end up in the poison queue? I want one failed queue per message type, I don't want to have to deal with the dead letter as well.

Thanks

1
"I don't want to have to deal with the dead letter as well." You should ALWAYS deal with the dead letter queue. Even if it is a thread monitoring it so it doesn't fill up.John Breakwell
I don't want one queue for message processing, and then several queues for error handling. It seems ridiculous to me. I want one queue for messages, and one queue for failures. Maybe I should try nservicebus?Jim
The MSMQ dead letter queues are part of the basic package, as it were. The sub-queues introduced for WCF support are really just a filter as they are sorting messages within the destination queue.John Breakwell

1 Answers

1
votes

You can set the value in the configuration file on the binding:

<bindings>
  <netMsmqBinding>
    <binding timeToLive="[define your timespan here]" />
    <!-- more configuration -->
  </netMsmqBinding>
</bindings>
...