简体   繁体   English

如何使用带有死信原因和错误描述的 Rest Api 向 Azure 服务总线订阅死信发送消息?

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

相关问题 Azure 服务总线从订阅的死信队列中删除特定消息 - Azure Service Bus Deleting specific message from deadletter queue of a subscription 如何在Azure Service Bus主题上删除DeadLetter消息 - How do I delete a DeadLetter message on an Azure Service Bus Topic Azure服务总线DeadLetter队列 - Azure Service Bus DeadLetter QUEUE Azure Service Bus订阅者Deadletter - Azure Service Bus Subscriber Deadletter Azure 服务总线死信队列消息无法在死信中停留更长时间 - Azure service bus deadletter queue message unable to stay in deadletter for longer time 如何在死信中的 Azure 服务总线 java function 中设置自定义死信原因? - How to set Custom deadletterreason in Azure service bus java function in deadletter? Azure WebJobs SDK Service Bus DeadLetter队列 - Azure WebJobs SDK Service Bus DeadLetter queue 当服务总线显式触发 Azure 函数死信消息,然后在最后抛出异常时会发生什么? - What happens when Service bus triggered Azure function deadletter a message explicitly and then throw exception at the end? 将消息移动到 azure 服务总线中的“死信” - Move message to 'deadletter ' in azure servicebus 如何从服务总线主题死信队列C#中读取? - How to read from service bus topic deadletter queue c#?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM