Reputation: 71
I'm performing an Orion NGSIv2 subscription that notifies cygnus in NGSIv1 using "attrsFormat":"legacy" otherwise cygnus crashes. Here the notification by example:
{
"description": "Subscription if parking is full",
"subject": {
"entities": [{
"idPattern": ".*",
"type": "parking"
}],
"condition": {
"attrs": ["full"]
}
},
"notification": {
"http": {
"url": "http://xxx.xxx.xxx.xx:5050/notify"
},
"attrsFormat": "legacy",
"attrs": ["full"]
}
}
My question is to be sure that there is no loss of information using the "attrsFormat":"legacy" to notify cygnus in NGSIv1 in case the attribute under condition of changing contains geographical information like geoJson. Thanks in advance.
Upvotes: 2
Views: 95
Reputation: 3798
First of all, yes, Cygnus currently only accepts NGSIv1 notifications. Nevertheless, that not means you cannot create NGSIv2 subscriptions: as you mention, the attrsformat
field must be used, with legacy
value, in order the notifications are sent in NGSIv1 format. More details here.
Regarding the content of a NGSIv1 notification derived from a NGSIv2 subscription, all the attributes and their types are maintained. It does not matter geo:json
is a special type for NGSIv2 and means nothing for NGSIv1: the type is sent in any case.
Upvotes: 0