我有一个对特定类型的猎户座实体执行订阅的操作员。但是,尽管我在推送订阅的选项对象中使用了相关字段(限制),但数据仍然以 20 个元素分页到达(我想增加它)。分页(限制)选项仅对查询操作有效,还是也可用于订阅?
这是我的代码:
var subscribe = function subscribe() {
this.connection = new NGSI.Connection(this.ngsi_server, {
ngsi_proxy_url: this.ngsi_proxy
});
var attributeList = null;
var duration = this.subscriptionUpdateRate;
var throttling = null;
var notifyConditions = [{
'type': 'ONCHANGE',
'condValues': this.condValues
}];
var options = {
flat: true,
limit: 999,
onNotify: function(data) {
handlerReceiveEntity(data);
},
onSuccess: function(data) {
....
window.addEventListener("beforeunload", function() {
this.connection.cancelSubscription(this.subscriptionID);
}.bind(this));
}.bind(this)
};
this.connection.createSubscription([this.entities], attributeList, duration, throttling, notifyConditions, options);
};
尽管如此,当函数第一次被调用时,我只得到了 20 个实体而不是 40 个。知道可能出了什么问题吗?
Orion 的版本是 0.14.0。