Orion Context Broker - 订阅仅通知前 20 个实体

Orion Context Broker - Subscriptions only notify the first 20 entities

使用这个脚本:

#!/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

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

使用 /v1/subscribeContext?limit=200 也无济于事。

有什么想法吗?

前段时间有 an open issue at Orion github about it

目前 Orion 的行为是这样的,但有一个解决方法:在进行订阅之前执行(分页)查询以获取所有实体。如果自查询和订阅以来有一些更新到达,可能会发生一些 "race condition",但是,根据用例,它可能就足够了。