Fiware: when does the subscription duration count starts?

徘徊边缘 提交于 2019-12-11 13:19:58

问题


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).



来源:https://stackoverflow.com/questions/37697121/fiware-when-does-the-subscription-duration-count-starts

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!