简体   繁体   English

我可以获取放入死信/中毒队列的消息的异常或原因吗?

[英]Can I obtain the exception or reason a message put into the dead letter / poison queue?

I am using Azure's service bus with the web jobs SDK as described in this tutorial with the dead letter (poison) queue. 本教程中所述,我将Azure的服务总线与Web作业SDK一起使用,并带有死信(毒药)队列。 Keeping it simple, I'm using POCO queue messages. 简单起见,我正在使用POCO队列消息。 When a message processing function fails enough times, the message is moved to the dead letter queue. 当消息处理功能失败足够的次数时,消息将被移至死信队列。

I have another webjob consuming the dead letter queue to notify the team that something went wrong. 我有另一个网络作业正在使用死信队列来通知团队出现问题。

Is there any way to obtain the exception/reason that the message was moved into the dead letter queue? 有什么方法可以获取将消息移入死信队列的异常/原因吗? For instance, if the POCO message failed serialization and was hence moved to the dead letter queue, what's the best way to find that out? 例如,如果POCO消息序列化失败,因此被移入了死信队列,那么找出它的最佳方法是什么?

I would like to try to avoid manually handling errors, putting messages into the dead letter queue myself, etc. The webjobs SDK does all that admirably. 我想避免手动处理错误,自己将消息放入死信队列等。webjobs SDK做到了这一切。

The WebJob re-tries to deliver the message configured number of times (default 10). WebJob重试以传递配置次数的消息(默认为10)。 If the delivery continues to fail (exception) the message is moved to dead-letter queue with the reason as MaxDeliveryCountExceeded. 如果传递继续失败(异常),则将消息移至死信队列,原因为MaxDeliveryCountExceeded。 If you need further details, explicit dead-lettering need to be used. 如果您需要更多详细信息,则需要使用明确的死字母。

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

相关问题 如何确定中毒队列消息的原因 - How to determine reason for poison queue message 使用存储队列和服务总线时,Azure 死信队列和毒药队列有什么区别? - What is the difference between Azure Dead Letter Queues and Poison Queues when using Storage Queue and Service Bus? 我们可以使用 .net 代码从 Azure 服务总线中的死信队列中删除基于序列号的特定死信消息吗? - can we delete a specific dead letter message based on the sequence number from dead letter queue in Azure service bus using .net code? 死信队列未清除 - Dead letter queue not cleared 在队列中找不到MSMQ有毒消息 - MSMQ poison message not found in queue 通过MessageId在Azure Service Bus死信队列上获取消息 - Getting a Message by MessageId on the Azure Service Bus Dead Letter queue 如何使用MassTransit在Azure中为死信队列创建处理程序? - How I can create handler for dead-letter queue in Azure using MassTransit? Azure 消息队列中的消息直接进入中毒消息队列 - Messages in Azure Message Queue are going Straight to the Poison Message Queue 如何在 Azure 服务总线中显式向主题订阅死信队列发送消息 - How to send message to Topic Subscription Dead Letter Queue Explicitly in Azure Service Bus 读取MSMQ事务性死信队列 - Reading the MSMQ transactional dead letter queue
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM