-->

Fiware: when does the subscription duration count

2019-07-29 12:50发布

问题:

Does the duration of the subscription is counted starting from the latest time that the broker sent a notification or from the latest time an entity published its value? If it is counted from the latest time the broker sent a notification, does this mean that the ONTIMEINTERVAL subscription can never expired?

Thanks & best regards.

回答1:

The duration of the subscription (for NGSIv1 subscriptions) starts in the moment of creating it (or updating duration). As explained in this piece of documenation:

expiration = current-time + duration

ONTIMEINTERVAL subscription behave as ONCHANGE ones with this regards. However, you shoudn't use ONTIMEINTERVAL, as they are deprecated:

ONTIMEINTERVAL subscriptions are deprecated since Orion 0.26.0 (removed in Orion 1.0.0). ONTIMEINTERVAL subscriptions have several problems (introduce state in CB, thus making horizontal scaling configuration much harder, and makes it difficult to introduce pagination/filtering). Actually, they aren't really needed, as any use case based on ONTIMEINTERVAL notification can be converted to an equivalent use case in which the receptor runs queryContext at the same frequency (and taking advantage of the features of queryContext, such as pagination or filtering).