简体   繁体   English

死信队列和毒药队列

[英]Dead Letter Queue and Poison Queues

I understand the difference between Dead Letter Queue and Poison Queue. 我了解“死信队列”和“毒药队列”之间的区别。 I will be speaking in the context of transactions and durability. 我将在交易和持久性方面进行发言。

DLQ: Client sends message. DLQ:客户端发送消息。 MSMQ is not able to deliver the message. MSMQ无法传递邮件。 Message remains in queue, waiting to be sent to the destination queue. 消息保留在队列中,等待发送到目标队列。

PQ: Message is successfully delivered. PQ:消息已成功传递。 WCF service processes the message. WCF服务处理该消息。 Some error occured during the WCF operations. 在WCF操作期间发生了一些错误。 Message is placed in the poison queue. 邮件放置在中毒队列中。

(please correct me if I am wrong above) (如果上面我写错了,请纠正我)

Now, if the WCF Service encounters an error, and with the transaction scope in place (attribute), then how does it place the message in the poison queue or does this have to be developed? 现在,如果WCF服务遇到错误,并且事务范围已到位(属性),那么它将如何将消息放入中毒队列,还是必须开发此消息? if it needs to be developed then how is it done? 如果需要开发,该怎么做? What about processing poison messages? 如何处理有毒消息? Is there a way to place them back in the queue for processing again? 有没有办法将它们放回队列以再次处理? How is it determined if the message is poison? 如何确定消息是否为毒药? For example, an operation in WCF may encounter an error but can recover from it. 例如,WCF中的操作可能会遇到错误,但可以从中恢复。

You can read more about Poison Message Handling on MSDN More about the MSMQ on MSDN - How to: Exchange Messages with WCF Endpoints and Message Queuing Applications 您可以在MSDN上阅读有关中毒消息处理的更多信息在MSDN上有关MSMQ的更多信息-如何:使用WCF端点和消息队列应用程序交换消息

"When the service reads messages from the target queue under a transaction, the service may fail to process the message for various reasons. The message is then put back into the queue to be read again. To deal with messages that fail repeatedly, a set of poison-message handling properties can be configured in the binding. There are four properties: ReceiveRetryCount, MaxRetryCycles, RetryCycleDelay, and ReceiveErrorHandling. " “当服务从事务处理下的目标队列中读取消息时,该服务可能由于各种原因而无法处理该消息。然后将该消息放回到队列中以再次读取。为处理反复失败的消息,可以在绑定中配置一组有毒消息处理属性。有四个属性:ReceiveRetryCount,MaxRetryCycles,RetryCycleDelay和ReceiveErrorHandling。

Only Message Queuing places messages in dead-letter queues. 只有消息队列将消息放在死信队列中。 Applications can only read and delete messages in dead-letter queues. 应用程序只能读取和删除死信队列中的消息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM