Details
-
Type:
Monitor
-
Status: Closed
-
Priority:
Major
-
Resolution: Done
-
Affects Version/s: None
-
Fix Version/s: 2021
-
Component/s: FIWARE-TECH-HELP
-
Labels:
-
HD-Chapter:Apps
-
HD-Enabler:Wirecloud
Description
Created question in FIWARE Q/A platform on 21-10-2014 at 13:10
Please, ANSWER this question AT https://stackoverflow.com/questions/26486072/pagination-in-subscription
Question:
Pagination in subscription
Description:
I have an operator that performs subscriptions for specific types of orion entities.
However, although i use the relevant field (limit) in the options object i push for the subscription, data still arrive paginated at 20 elements (I would like to increase it). Is pagination (limit) option valid only for query operations, or is it available for subscriptions as well?
Here is my code:
var subscribe = function subscribe() {
this.connection = new NGSI.Connection(this.ngsi_server,
);
var attributeList = null;
var duration = this.subscriptionUpdateRate;
var throttling = null;
var notifyConditions = [
];
var options = {
flat: true,
limit: 999,
onNotify: function(data)
,
onSuccess: function(data) {
....
window.addEventListener("beforeunload", function()
.bind(this));
}.bind(this)
};
this.connection.createSubscription([this.entities], attributeList, duration, throttling, notifyConditions, options);
};
Still, I am getting only 20 entities instead of ~40 when the function is first invoked. Any idea what might be wrong?
The version of Orion is 0.14.0.
Activity
Field | Original Value | New Value |
---|---|---|
Component/s | FIWARE-TECH-HELP [ 10278 ] |
Assignee | Álvaro Arranz [ aarranz ] |
HD-Enabler | Wirecloud [ 10857 ] | |
Description |
Created question in FIWARE Q/A platform on 21-10-2014 at 13:10 {color: red}Please, ANSWER this question AT{color} https://stackoverflow.com/questions/26486072/pagination-in-subscription +Question:+ Pagination in subscription +Description:+ I have an operator that performs subscriptions for specific types of orion entities. However, although i use the relevant field (limit) in the options object i push for the subscription, data still arrive paginated at 20 elements (I would like to increase it). Is pagination (limit) option valid only for query operations, or is it available for subscriptions as well? Here is my code: 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); }; Still, I am getting only 20 entities instead of ~40 when the function is first invoked. Any idea what might be wrong? The version of Orion is 0.14.0. |
Created question in FIWARE Q/A platform on 21-10-2014 at 13:10
{color: red}Please, ANSWER this question AT{color} https://stackoverflow.com/questions/26486072/pagination-in-subscription +Question:+ Pagination in subscription +Description:+ I have an operator that performs subscriptions for specific types of orion entities. However, although i use the relevant field (limit) in the options object i push for the subscription, data still arrive paginated at 20 elements (I would like to increase it). Is pagination (limit) option valid only for query operations, or is it available for subscriptions as well? Here is my code: 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); }; Still, I am getting only 20 entities instead of ~40 when the function is first invoked. Any idea what might be wrong? The version of Orion is 0.14.0. |
HD-Chapter | Apps [ 10836 ] |
Status | Open [ 1 ] | In Progress [ 3 ] |
Status | In Progress [ 3 ] | Answered [ 10104 ] |
Resolution | Done [ 10000 ] | |
Status | Answered [ 10104 ] | Closed [ 6 ] |
Fix Version/s | 2021 [ 12600 ] |
Transition | Time In Source Status | Execution Times | Last Executer | Last Execution Date | |||||
---|---|---|---|---|---|---|---|---|---|
|
2h 11m | 1 | Fernando Lopez | 30/May/17 11:15 AM | |||||
|
2s | 1 | Fernando Lopez | 30/May/17 11:15 AM | |||||
|
2s | 1 | Fernando Lopez | 30/May/17 11:15 AM |
2017-05-30 09:05|CREATED monitor | # answers= 1, accepted answer= True