...
# | Person | Approach |
---|---|---|
1 | [Relates to point 3 from high-level steps] It would be good to have async implementation only dependent on NCMP. So that it does not break or work with only few DMI plugins. 2. No async request get lost because of pod restart or JVM crash. |
Proposed Message Format
...
Success Scenario
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
DMI Event sent to NCMP ------------------------------- { "eventId" : "9999", # some generic event uuid generated by DMI Plugin “eventCorrelationId” : “request-009995”, # for event correlation - acts as the request Id when # eventType=org.onap.ncmp.async-request-response-event "eventTime" : "2021-11-16T16:42:25-04:00", "eventSource" : "org.onap.ncmp", # ??? Is this needed? "eventType" : "org.onap.ncmp.async-request-response-event", # event type for async request response events ”eventSchema” : “org.onap.ncmp:async-request-response-event:v1", # event schema for async request response events “eventTarget” : “topic:client-application-topic” ” # indicates where to route the event # - ‘topic’ is default target type "event": { “response-data-schema” : “org.onap.cps.yang-patch-json:v1”, “response-status” : “SUCCESS”, “response-code” # - ‘topic’ is default target type "event": { “response-data-schema” : “org.onap.cps.yang-patch-json:v1”, “response-status” : “SUCCESS”, “response-code” : : “201”, “response-data” : { … <response-data-payload> … } } } |
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<response-data-payload>
…
}
}
}
NCMP Event forwarded to Client topic (in eventTarget)
----------------------------------------------------------------------
{
"eventId" : "33001", # some generic event uuid generated by NCMP
“eventCorrelationId” : “request-009995”, # for event correlation - acts as the request Id when
# eventType=org.onap.ncmp.async-request-response-event
"eventTime" : "2015-11-16T16:42:26-05:06",
"eventSource" : "org.onap.ncmp", # The source of the event
"eventType" : "org.onap.ncmp.async-request-response-event", # event type for async request response events
”eventSchema” : “org.onap.ncmp:async-request-response-event:v1", # event schema for async request response events
"eventOrigin" : {
"eventId" : "00001", # some generic event uuid generated by DMI Plugin
"eventTime" : "2021-11-16T16:42:25-04:00",
“eventCorrelationId” : “request-009995”,
"eventSource" : "org.onap.dmi", # ??? Is this needed?
"eventType" : "org.onap.ncmp.async-request-response-event", # event type for async request response events
”eventSchema” : “org.onap.ncmp:async-request-response-event:v1", # event schema for async request response events
“eventTarget” : “topic:client-application-topic”
}
"event": {
“response-data-schema” : “org.onap.cps.yang-patch-json:v1”,
“response-status” : “SUCCESS”,
“response-code” : “201”,
“response-data” : {
…
<response-data-payload>
…
}
}
} |
Failure Scenario
Code Block | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||
DMI Event sent to NCMP
-------------------------------
{
"eventId" : "9999", # some generic event uuid generated by DMI Plugin
“eventCorrelationId” : “request-009995”, # for event correlation - acts as the request Id when
# eventType=org.onap.ncmp.async-request-response-event
"eventTime" : "2021-11-16T16:42:25-04:00",
"eventSource" : "org.onap.ncmp", # ??? Is this needed?
"eventType" : "org.onap.ncmp.async-request-response-event", # event type for async request response events
”eventSchema” : “org.onap.ncmp:async-request-response-event:v1", # event schema for async request response events
“eventTarget” : “topic:client-application-topic” ” # indicates where to route the event
# - ‘topic’ is default target type "event": {
“response-data-schema” : “org.onap.cps.generic-error:v1”,
“response-status” : “FAILURE”,
“response-code” : “404”,
“response-data” : {
…
<response-data-payload-as-org.onap.ncmp.generic-error:v1>
…
}
}
} |
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
NCMP Event forwarded to Client topic (defined in eventTarget)
----------------------------------------------------------------------
{
"eventId" : "33001", # some generic event uuid generated by NCMP
“eventCorrelationId” : “request-009995”, # for event correlation - acts as the request Id when
# eventType=org.onap.ncmp.async-request-response-event
"eventTime" : "2015-11-16T16:42:26-05:06",
"eventSource" : "org.onap.ncmp", # The source of the event
"eventType" : "org.onap.ncmp.async-request-response-event", # event type for async request response events
”eventSchema” : “org.onap.ncmp:async-request-response-event:v1", # event schema for async request response events
"eventOrigin" : {
"eventId" : "00001", # some generic event uuid generated by DMI Plugin
"eventTime" : "2021-11-16T16:42:25-04:00",
“eventCorrelationId” : “request-009995”,
"eventSource" : "org.onap.dmi", # ??? Is this needed?
"eventType" : "org.onap.ncmp.async-request-response-event", # event type for async request response events
”eventSchema” : “org.onap.ncmp:async-request-response-event:v1", # event schema for async request response events
“eventTarget” : “topic:client-application-topic”
}
"event": {
“response-data-schema” : “org.onap.cps.generic-error:v1”,
“response-status” : “FAILURE”,
“response-code” : “404”,
“response-data” : {
…
<response-data-payload-as-org.onap.ncmp.generic-error:v1>
…
}
}
} |
...