[英]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.