繁体   English   中英

Orion订阅不会检测到实体的删除

[英]Orion subscriptions do not detect the removal of entities

订阅检测实体的创建和更新,但不检测实体的删除。

  • 订阅创建:

POST http:// myhost:orion_port / v2 / subscriptions

{
    "description": "Send a notification to detect any change",
    "subject": {
        "entities": [{
            "idPattern": ".*"
        }]
    },
    "notification": {
        "http": {
            "url": "http://myhost:myport/myendpoint"
        }
    }
}
  • 实体创建:

POST 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"
        }]
    }]

}

  • 实体更新:

PUT 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

首先,我发送订阅创建以检测实体中的更改。

后来,我创建了一个实体,订阅执行没有问题。 然后我更新实体名称,我再次完全收到订阅,但如果我删除该实体,我没有收到任何事件。

有什么方法可以接收订阅事件以检测实体何时被删除?

不幸的是,没有订阅处理删除事件

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM