【问题标题】:Fiware - Orion Context Broker subscription expirationFiware - Orion Context Broker 订阅到期
【发布时间】:2016-06-14 07:33:48
【问题描述】:

我正在使用 Orion 上下文代理 1.0.0 版。我有一个活跃的订阅,不断收到应该重定向到天鹅座的通知。

我担心的是,上周四此订阅确实到期了。从理论上讲,当订阅不断向其订阅者发送通知时,到期日期会更新。那么,有谁知道为什么那个有效订阅过期了?

这就是我进行订阅注册的方式:

(curl 172.21.0.33:1026/v1/subscribeContext -s -S --header 'Fiware-Service: xxxx' --header 'Fiware-ServicePath: /xxxx/xxxx' --header 'Content-Type: application/json' --header 'Accept: application/json' -d  @- | python -mjson.tool) <<EOF
{
    "entities": [
        {
            "type": "tmp_reading",
            "isPattern": "true",
            "id": ".*"
        }
    ],
    "attributes": [],
    "reference": "http://172.21.0.23:5050/notify",
    "duration": "P1M",
    "notifyConditions": [
        {
            "type": "ONCHANGE",
            "condValues": []
        }
    ]
}
EOF  

一种临时解决方案似乎是建立一个非常大的持续时间。有必要吗?

【问题讨论】:

    标签: fiware fiware-orion


    【解决方案1】:

    理论上,当订阅不断向其订阅者发送通知时,到期日期会更新

    这是不正确的。相反,订阅只要未达到其到期日期就处于活动状态,其计算方法为当前时间 + 订阅创建/更新时间的持续时间 (in NGSIv1) 或直接为 expires 字段的值(in NGSIv2),无论是否发送通知。

    此外,请注意 NGSIv2 允许创建永久订阅(未指定 expires 字段的订阅)。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-08-03
      相关资源
      最近更新 更多