当使用MSMQ和WCF时,请描述决定死信队列URI的算法/规则?
例如:net.msmq://localhost/private/MyQueue;DeadLetter
或 net.msmq://localhost/system$;DeadLetter
还是其他?
我问这个问题是因为我发现了一个超越者问题,但我不同意答案,但我无法找到一个明确的定义来准确描述规则。我查过 MSDN 和两本鱼类书籍。
最佳答案
根据MSDN docs ,这就是你的答案:
Reading Messages from the Dead-Letter Queue
An application that reads messages out of a dead-letter queue is similar to a WCF service that reads from an application queue, except for the following minor differences:
To read messages from a system transactional dead-letter queue, the Uniform Resource Identifier (URI) must be of the form:
net.msmq://localhost/system$;DeadXact
To read messages from a system non-transactional dead-letter queue, the URI must be of the form:
net.msmq://localhost/system$;DeadLetter
每个 URL/服务都没有死信队列,而是每个系统/机器都有一个死信队列。
关于wcf - 我如何知道死信队列的URI?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8778749/