Fiware:订阅持续时间从什么时候开始计算? [英] Fiware: when does the subscription duration count starts?

查看:112
本文介绍了Fiware:订阅持续时间从什么时候开始计算?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是从代理发送通知的最新时间开始还是从实体发布其值的最新时间开始计算订阅的持续时间? 如果从代理发送通知的最近时间开始算起,这是否意味着ONTIMEINTERVAL订阅永远不会过期?

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.

推荐答案

订阅的持续时间(对于NGSIv1订阅)从创建时开始(或更新持续时间).如一段文档中所述:

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订阅的行为与ONCHANGE的行为相同.但是,您不应该使用ONTIMEINTERVAL,因为它们已被弃用 :

自从Orion 0.26.0(在Orion 1.0.0中删除)以来,不赞成使用

ONTIMEINTERVAL订阅. ONTIMEINTERVAL订阅有几个问题(在CB中引入状态,因此使水平缩放配置更加困难,并且难以引入分页/过滤).实际上,它们并不是真正需要的,因为任何基于ONTIMEINTERVAL通知的用例都可以转换为等效的用例,在该用例中,接收器以相同的频率运行queryContext(并利用queryContext的功能,例如分页或过滤) ).

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

这篇关于Fiware:订阅持续时间从什么时候开始计算?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆