【问题标题】:How to track failed/expired azure event grid delivery message?如何跟踪失败/过期的天蓝色事件网格传递消息?
【发布时间】:2018-06-25 05:16:11
【问题描述】:

很高兴看到 azure 事件网格具有 24 小时重试策略,具有 99.99% 可用性的事件交付指数回退。但是,我遇到了这样一种情况,即预期的事件网格消息之一即使在 24 小时后也没有到达。

我为事件配置了一个 Web 挂钩,主题为 /subscriptions/id/resourcegroups/name/providers/Microsoft.Resources/deployments/name门户。

您能否帮助澄清以下问题,

  1. 要检查是否尝试了 24 小时重试,在哪里可以找到日志
  2. 如果尝试和重试都用尽了,我在哪里可以找到日志
  3. 如果由于事件网格发生故障或不可用而导致即使消费者可用,也没有发生交付,我在哪里可以找到日志

【问题讨论】:

  • 未来 EventGrid 会有一个死信队列。目前,不要认为您正在寻找的任何信息都可用。 Azure Monitor 很可能会提供您正在寻找的指标。
  • 感谢@SeanFeldman。指标涵盖了一些场景,是的,但除了数字之外什么也得不到。刚刚注意到管道中与此类似的东西,feedback.azure.com/forums/909934-azure-event-grid/suggestions/…
  • 订阅中deadletterdestination的功能已经发布,还在预览中,看我更新的答案。

标签: azure azure-eventgrid


【解决方案1】:

就像肖恩的评论中提到的那样,这项支持即将推出。

基于 Microsoft.Azure.Management.EventGrid,Version=2.0.0.0 我们可以在事件订阅中预期一个新的属性,例如 deadletterdestination,请参见以下内容创建或更新订阅示例的有效载荷 sn-p:

    {
      "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。

以下屏幕 sn-p 显示存储在 blob 存储中的死信:

查看更多详情here

【讨论】:

    猜你喜欢
    • 2021-07-17
    • 2018-02-16
    • 1970-01-01
    • 2021-01-26
    • 2021-09-01
    • 1970-01-01
    • 2023-03-24
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多