Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

...

#

1idUUID of the event
2source
urn:cps:org.onap.cps
3schema
urn:cps:org.onap.cps:data-updated-event-schema:v1
4type
org.onap.cps.data-updated-delta-event
5content
{
"operation": "UPDATE",
"
anchorName": "Anchor1",
"dataspaceName": "dataspace1",
"schemaSetName": "schemaset1",
"
observedTimestamp": timestamp,
"data":
Code Block
languagetext
titledata body
collapsetrue
[
  {
    "action": "ADD",
    "xpath": "/bookstore/categories/[@code=3]",
    "payload": {
      "code": 3,
      "name": "kidz"
    }
  },
  {
    "action": "DELETE",
    "xpath": "/bookstore/categories/[@code=1]",
    "payload": {
      "code": 1,
      "name": "Fiction"
    }
  },
  {
    "action": "UPDATE",
    "xpath": "/bookstore/categories/[@code=2]",
    "payload": {
      "name": "Comic"
    }
  }
]
}

...

Implementation of controlling delta notification 

While creating an anchor client need to provide an optional parameter (query parameter/header) to receive delta notification in Kafka. by default, delta notification will be disabled for all anchors. 

delta notification can be disabled for an anchor in anchor update API. 

additional header in create/update anchor request

...

Delta notification can be enabled/disabled by an additional admin API for a given anchor name. New API will be added as below.


API :  PUT https://localhost:8333/cps/api/v2/dataspace/<dataspace-name>/deltanotification


Request body:

{

"anchorName": "anchor01",

"subscribeDeltaNotification": true

}



Additional table to persist delta notification 

...