就像肖恩的评论中提到的那样,这种支持即将到来。
基于Microsoft.Azure.Management.EventGrid , Version=2.0.0.0 我们可以预期事件订阅中有一个新属性,例如deadletterdestination,请参阅以下示例的有效内容片段,用于创建或更新订阅:
{
"properties": {
"deadletterdestination": {
"endpointType": "StorageBlob",
"properties": {
"blobContainerName": "{myContainerName}",
"resourceId": "/subscriptions/{mySubscriptionId}/resourceGroups/{myResourceGroup}/providers/Microsoft.Storage/storageAccounts/{myStorageAccount}"
}
},
"destination": {
"endpointType": "WebHook",
"properties": {
"endpointUrl": "{myEndpointUrl}"
}
},
"filter": {
"isSubjectCaseSensitive": false,
"subjectBeginsWith": null,
"subjectEndsWith": null
},
"labels": ["xxx"],
"eventDeliverySchema": "InputEventSchema",
"retryPolicy": {
"maxDeliveryAttempts": 30,
"eventTimeToLiveInMinutes": 1440
}
}
}
当您发出 REST 请求 (api-version=2018-05-01-preview) 以使用上述有效负载创建事件订阅时,响应失败并显示以下消息:
{
"error": {
"code": "InvalidRequest",
"message": "DeadLettering is currently not enabled in the service and support for it is coming soon. Until then, please re-issue the event subscription creation/update request without setting a deadletter destination."
}
}
我很期待这个很棒的功能,每个订阅都可以成为死信事件的来源,我希望会有更多的端点类型用于死信目的地,例如 EventHub、StorageQueue、ServiceBus、WebHook 等。
更新:
感谢 azure 事件网格团队发布了 deadletterdestination功能的预览。现在,每个订阅都可以决定何时发送死信。今天我们可以将它发送到存储 blob。
以下屏幕片段显示了存储在 blob 存储中的死信:

在此处查看更多详细信息。