Reputation: 263
I'm working with Orion context Broker version 1.0.0. I have an active subscription constantly receiving notifications that should be redirected to a cygnus.
My concern is that last thursday this subscription did expire. Theorically, while a subscription keeps sending notifications to it's subscribers, the expiration date is updated. Then, anyone knows why that active subscription did expire?
That's how I do the subscription registrations:
(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
One temporal solution seems to be to establish a very large duration period. Is that neccessary?
Upvotes: 1
Views: 175
Reputation: 12322
Theorically, while a subscription keeps sending notifications to it's subscribers, the expiration date is updated
That's not correct. On the contrary, a subscription is active as long as it hasn't reached its expiration date, which is calculated with current time + duration at subcription creation/updating time (in NGSIv1) or directly is the value of the expires
field (in NGSIv2), no matter if notifications are being sent or not.
In addition, note that NGSIv2 allows to create permanent subscriptions (the ones created without specifying the expires
field).
Upvotes: 1