Fiware-Orion:订阅所有实体

时间:2017-04-05 11:35:43

标签: fiware-orion

在Orion 1.4.0中,我使用以下JSON为所有实体订阅

{
  "description": "Update average rating",
  "subject": {
    "entities": [
      {
        "idPattern": ".*",
        "type": ""
      }
    ],
    "condition": {
      "attrs": []
    }
  },
  "notification": {
    "http": {
      "url": "http://URL:1026/v2"
    }
  },
  "expires": "2020-01-01T00:00:00.00Z",
  "throttling": 5
}

今天我用Orion 1.7.0尝试了这个JSON,这不再适用了。它返回以下错误:

ERROR 400
{"error":"BadRequest","description":"entity type length: 0, min length supported: 1"}

我意识到,这是因为"type": ""。我将其更改为"type": "*"。订阅有效,但我没有收到任何通知。可能*不是订阅所有实体的正确模式。

供参考:https://github.com/telefonicaid/fiware-orion/issues/2876

1 个答案:

答案 0 :(得分:2)

尝试使用"typePattern": ".*"代替"type": ""