我正在使用Orion context Broker 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
一个时间解决方案似乎是 Build 一个非常大的持续时间 . 这是必要的吗?
1 回答
's not correct. On the contrary, a subscription is active as long as it hasn' t达到其到期日期,该日期是在订阅创建/更新时间(in NGSIv1)的当前持续时间内计算的,或者直接是
expires
字段(in NGSIv2)的值,无论是否发送通知 .此外,请注意NGSIv2允许创建永久订阅(创建的订阅而不指定
expires
字段) .