Fiware-Orion:订阅所有实体
Fiware-Orion: Subscribe to all entities
在 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,但它不再起作用了。它 returns 出现以下错误:
ERROR 400
{"error":"BadRequest","description":"entity type length: 0, min length supported: 1"}
我意识到,这是因为 "type": ""
。我把它改成了"type": "*"
。订阅现在有效,但我没有收到任何通知。 *
可能不是为所有实体订阅的正确模式。
供参考:https://github.com/telefonicaid/fiware-orion/issues/2876
尝试使用 "typePattern": ".*"
而不是 "type": ""
。
在 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,但它不再起作用了。它 returns 出现以下错误:
ERROR 400
{"error":"BadRequest","description":"entity type length: 0, min length supported: 1"}
我意识到,这是因为 "type": ""
。我把它改成了"type": "*"
。订阅现在有效,但我没有收到任何通知。 *
可能不是为所有实体订阅的正确模式。
供参考:https://github.com/telefonicaid/fiware-orion/issues/2876
尝试使用 "typePattern": ".*"
而不是 "type": ""
。