Fiware - Orion Context Broker 订阅到期
Fiware - Orion Context Broker subscription expiration
我正在使用 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
一个临时解决方案似乎是建立一个非常长的持续时间段。有必要吗?
Theorically, while a subscription keeps sending notifications to it's subscribers, the expiration date is updated
这是不正确的。相反,订阅只要未到到期日期就处于活动状态,到期日期是根据当前时间 + 订阅时长 creation/updating 时间 (in NGSIv1) or directly is the value of the expires
field (in NGSIv2) 计算的,无论是否正在通知是否发送。
此外,请注意 NGSIv2 允许创建永久订阅(创建时未指定 expires
字段)。
我正在使用 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
一个临时解决方案似乎是建立一个非常长的持续时间段。有必要吗?
Theorically, while a subscription keeps sending notifications to it's subscribers, the expiration date is updated
这是不正确的。相反,订阅只要未到到期日期就处于活动状态,到期日期是根据当前时间 + 订阅时长 creation/updating 时间 (in NGSIv1) or directly is the value of the expires
field (in NGSIv2) 计算的,无论是否正在通知是否发送。
此外,请注意 NGSIv2 允许创建永久订阅(创建时未指定 expires
字段)。