【问题标题】:posting custom message to event grid via logicapps通过逻辑应用将自定义消息发布到事件网格
【发布时间】:2019-02-13 10:16:18
【问题描述】:

我在 logicapp 中使用发布事件

{
  "error": {
    "code": "BadRequest",
    "message": "Unexpected token when reading JSON. Expected: StartObject, actual: StartArray. Report '01a24d3c-7588-4580-b650-52aa4f25b805:9/8/2018 7:17:33 AM (UTC)' to our forums for assistance or raise a support ticket.",
    "details": [
      {
        "code": "InputJsonInvalid",
        "message": "Unexpected token when reading JSON. Expected: StartObject, actual: StartArray. Report '01a24d3c-7588-4580-b650-52aa4f25b805:9/8/2018 7:17:33 AM (UTC)' to our forums for assistance or raise a support ticket."
      }
    ]
  }
}

所以我尝试发送示例消息

[
  {
    "id": "1807",
    "eventType": "recordInserted",
    "subject": "myapp/vehicles/motorcycles",
    "eventTime": "2017-08-10T21:03:07+00:00",
    "data": {
      "make": "Ducati",
      "model": "Monster"
    },
    "dataVersion": "1.0"
  }
]

但仍然得到相同的结果。

【问题讨论】:

  • 嗯,我使用 CloudEvent 架构创建了事件,但 Flow 连接器仅执行 EventGrid 架构。可能是相关的。
  • 我想可能是这样。我使用 EventGrid 架构重新创建了一个新的事件网格,现在发布事件从 Flow & LogicApps 工作。

标签: azure-eventgrid cloudevents


【解决方案1】:

对于 CloudEvent 架构,请尝试以下示例消息:

    {
      "cloudEventsVersion": "0.1",
      "eventTypeVersion": "",
      "eventId": "12345",
      "source": "#/myapp/vehicles/motorcycles",
      "eventType": "recordInserted",
      "eventTime": "2018-09-08T13:05:47.6120424Z",
      "data": {
        "make": "Ducati",
        "model": "Monster"
       }
    }

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2020-11-21
    • 1970-01-01
    • 2021-01-23
    • 2021-11-02
    • 2011-09-05
    • 2022-11-07
    • 2020-12-23
    • 1970-01-01
    相关资源
    最近更新 更多