Reputation: 16012
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
Upvotes: 0
Views: 591
Reputation: 4632
You can set the value in the configuration file on the binding:
<bindings>
<netMsmqBinding>
<binding timeToLive="[define your timespan here]" />
<!-- more configuration -->
</netMsmqBinding>
</bindings>
...
Upvotes: 2