gpt4 book ai didi

wcf - MSMQ WCF,接收时间

转载 作者:行者123 更新时间:2023-12-03 08:35:33 25 4
gpt4 key购买 nike

使用 MSMQ WCF 客户端和服务器时如何设置消息 timeToBeRecieved?

我正在使用 msmq 服务来管理到不可靠目标系统的消息传递。消息可能会持续数天未送达。

大多数无效消息使用服务器绑定(bind)中的以下设置进入毒队列。

receiveErrorHandling="Move"

一些消息最终进入系统死信队列而不是毒队列。有没有办法配置死信消息进入与上述相同的队列?队列是实际消息队列的子队列,称为 queue;poison。

如何将 timeToBeReceived 设置为足够大的值以使消息最终进入毒队列?我希望每种消息类型都有一个失败的队列,我也不想处理死信。

谢谢

最佳答案

您可以在绑定(bind)的配置文件中设置值:

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

关于wcf - MSMQ WCF,接收时间,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10083589/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com