订阅检测实体的创建和更新,但不检测实体的删除。
- 创建订阅:
发布http://myhost:orion_port/v2/subscriptions
{
"description": "Send a notification to detect any change",
"subject": {
"entities": [{
"idPattern": ".*"
}]
},
"notification": {
"http": {
"url": "http://myhost:myport/myendpoint"
}
}
}
- 实体创建:
发布http://myhost:iot_aget_json_port/iot/devices
{
"devices": [{
"device_id": "entity_test_agent",
"entity_name": "entity_test_orion",
"entity_type": "test",
"transport": "HTTP",
"protocol": "IoTA-JSON",
"attributes": [{
"object_id": "status",
"name": "status",
"type": "Text"
}],
"static_attributes": [{
"name": "name",
"type": "Text",
"value": "Test"
}]
}]
}
- 实体更新:
放置http://myhost:orion_port/v2/entities/entity_test_orion/attrs/name
{
"value": true
}
- 删除实体:
删除http://myhost:orion_port/v2/entities/entity_test_orion
删除http://myhost:iot_aget_json_port/iot/devices/entity_test_agent
首先,我发送订阅创建以检测实体中的更改。
后来,我创建了一个实体,并且订阅执行没有问题。然后我更新实体名称并再次完美地收到订阅,但如果我删除实体,我不会收到任何事件。
有什么方法可以接收订阅事件来检测实体何时被删除?
最佳答案
不幸的是,没有处理删除事件的订阅
关于fiware - Orion 订阅不会检测实体的删除,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54220061/