[英]How to Send message to Azure Service Bus Subscription Deadletter using Rest Api with deadletter Reason and Error Description?
I can't find an example of how to send a message to a Azure Service Bus Subscription DeadLetter using rest api.我找不到有关如何使用 rest api 向 Azure 服务总线订阅 DeadLetter 发送消息的示例。 It appears that the suffix for the endpoint should be /Subscriptions//$deadletterqueue.
端点的后缀似乎应该是 /Subscriptions//$deadletterqueue。 However, I can't find an example of how to pass the deadletterReason, and the deadLetterErrorDescription.
但是,我找不到有关如何传递 deadletterReason 和 deadLetterErrorDescription 的示例。 Is it be as simple as passing those values as message headers?
是否像将这些值作为消息标头传递一样简单?
Messages are not sent directly to the dead-letter queue by the client code (REST API or any other SDK).客户端代码(REST API 或任何其他 SDK)不会将消息直接发送到死信队列。 Instead, messages are dead-lettered by the broker when
MaxDeliveryCount
is exceeded and no more attempts to process the message can be made.相反,当消息是死字母由经纪人
MaxDeliveryCount
超出,并且可以由没有更多的尝试来处理消息。 That's when the broker will move the message to the dead-letter queue with the reason.这就是代理将消息移动到死信队列的原因。
Not that there are also less common reasons, such as the number of hops (forwarding), expired time-to-live, etc. MaxDeliveryCount
is the most common scenario.并不是说也有不太常见的原因,例如跳数(转发)、过期的生存时间等。
MaxDeliveryCount
是最常见的场景。
Microsoft documentation will help in addition to this post.除了这篇文章之外,Microsoft 文档也会有所帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.