当尝试使用STH来存储和检索发送到OCB的数据时,我在进行订阅时遇到问题.
我的问题是订阅创建顺利.当我按以下方式创建订阅时:
POST /v1/contextSubscriptions HTTP/1.1
Host: <cb_host>:1026
Content-Type: application/json
Fiware-Service: myService
Fiware-ServicePath: /myServicePath
Cache-Control: no-cache
{
"entities": [
{
"type": "cameraSimple",
"isPattern": "true",
"id": "sensor03"
}
],
"attributes": [
"class"
],
"reference": "http://<cb_host>:8666/notify",
"duration": "P1M",
"notifyConditions": [
{
"type": "ONCHANGE",
"condValues": [
"class"
]
}
],
"throttling": "PT5S"
}
Run Code Online (Sandbox Code Playgroud)
我收到以下答案:
{
"subscribeResponse": {
"subscriptionId": "588b4f38e2066a50fa98df9b",
"duration": "P1M",
"throttling": "PT5S"
}
}
Run Code Online (Sandbox Code Playgroud)
但是在Fiware服务器上,我看到有关运行容器的终端中的条件的错误,以及有关属性的另一个错误:
orion | ERROR@14:06:10 safeMongo.cpp[302]: Runtime Error (field 'conditions' was supposed to be an array but type=4 in BSONObj …Run Code Online (Sandbox Code Playgroud)