【发布时间】:2020-06-25 15:10:29
【问题描述】:
我们希望根据“设备时间”属性过滤发送给 Draco 的通知。只有当该属性不为空时,我们才想向 Draco 发送数据。我们如何在 Draco 订阅中实现这一点。我在表达上尝试了很多组合,但没有任何效果。你能在这里帮忙吗:
curl -iX POST \
'http://52.172.34.29:1026/v2/subscriptions?options=skipInitialNotification' \
-H 'Content-Type: application/json' \
-H 'fiware-service: openiot' \
-H 'fiware-servicepath: /' \
-d '{
"description": "Subscription",
"subject": {
"entities": [
{
"idPattern": ".*"
}
],
"condition": {
"attrs": [],
"expression":{"q":"devicetime==.*"}
}
},
"notification": {
"http": {
"url": "http://52.172.34.29:3003/v2/notify"
},
"attrs": [],
"onlyChangedAttrs":true,
"throttling": 5
}
}'
【问题讨论】: