猎户座上下文代理 - 订阅仅通知前20个实体

时间:2017-03-10 15:33:10

标签: fiware-orion

使用此脚本:

Sanity Report

Start time:Fri Mar 10 08:08:33 CST 2017

LABS:
1: lht1-u0 (172.28.152.240)
2: lht1-u1 (172.28.152.241)

BUILDS:

CCM: 455
AMM: 395
OEBase: 864 
ACS_DM: 569
AMS_DM: 707
TC Area TC Title Status

System-VM0 install ------------------------------------- Passed
System-VM1 install ------------------------------------- Passed
OpensSaf start ----------------------------- Passed
Verify alarmd server is -------------------------------- Passed
Product install of AMM ------------------------- Passed
Product install of AMM ------------------------- Passed

订阅170个实体(Parquimetro:1,Parquimetro:2,Parquimetro:3,...,Parquimetro:170)以通知Comet存储历史数据,但只有前20个实体得到通知。我需要它来通知所有实体(现在是170,而不是20)。

使用#!/bin/bash (curl http://orionip:1026/v1/subscribeContext -s -S --header 'Content-Type: application/json' \ --header 'Accept: application/json' --header 'fiware-service: service' --header 'fiware-servicepath: /servicepath' \ -d @- | python -mjson.tool) <<EOF { "entities": [ { "type": "Sensor", "isPattern": "true", "id": "Parquimetro:.*" } ], "attributes": [ "recaudacion" ], "reference": "http://cometip:80/notify", "duration": "P4Y", "notifyConditions": [ { "type": "ONCHANGE", "condValues": [ "recaudacion", "numeroTiques" ] } ], "throttling": "PT24H" } EOF 也无济于事。

有什么想法吗?

1 个答案:

答案 0 :(得分:1)

从前不久有an open issue at Orion github about it

目前Orion的行为方式如此,但有一个解决方法:在执行订阅之前执行(分页)查询以获取所有实体。如果从查询和订阅到达某些更新,它可能会发生一些“竞争条件”,但是,根据用例,它可能就足够了。