1

我有一个对特定类型的猎户座实体执行订阅的操作员。但是,尽管我在推送订阅的选项对象中使用了相关字段(限制),但数据仍然以 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。

4

1 回答 1

2

据我所知,Orion Context Broker 不允许在订阅中使用限制/偏移参数,它的使用仅限于查询操作。此外,我从未见过分页通知。无论如何,如果这是 Orion Context Broker API 的更改,请在WireCloud 的问题跟踪器中创建一个工单。

有关更多信息,请参阅Orion Context Broker - 用户和程序员指南,但我没有看到任何可以解释此行为的相关更改。

于 2014-10-22T07:50:39.273 回答