...
# | 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
...
Infocode | ||
---|---|---|
| ||
-------------------------------------------------------------------------------------------------------------------------------------------------------------- black is NCMP standard event schema. |
Success Scenario
Info | ||||||
---|---|---|---|---|---|---|
| ||||||
DMI Event sent to NCMP { "eventId" : "9999", # some generic event uuid generated by DMI Plugin | ||||||
| ||||||
{
"eventId" : "9999", # some generic event uuid generated by DMI Plugin
“eventCorrelationId” : “request-009995”, # for event correlation - acts as the request Id when eventType=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 # event type for async request response events # event schema for async request response events “eventTarget” :events # indicates where to route the event : “org“org.onap.cps.yang-patch-json: v1”, “response-status” : “SUCCESS”, “response-code” : “200”, “response-data” : { … <response-data-payload> # This is same as would be returned by synchronous call … } }v1”, |
- Is this not NCMP to DMI rather than DMI to NCMP?
- Should response code above be OK?
- Is there too much information being returned to NCMP?
- Should we just return OK??
Code Blockinfo | |||
---|---|---|---|
| |||
NCMP Event forwarded to Client topic (in eventTarget) | |||
collapse | true | ---------------------------------------------------------------------- { { "eventId" : "33001", # some generic event uuid generated by NCMP “eventCorrelationId” : “request-009995”, # for event correlation - acts as the request Id when eventType=sync-request-response-event "eventTime" : "eventId" : "33001", # some generic event uuid generated by NCMP "2015-11-16T16:42:26-05:06",
: "org.onap.ncmp", # The source of the event "eventType" : # The source of the event # event type for async request response events # event schema for async request response eventsevents : { "eventId" : "00001", # some generic event uuid generated by DMI Plugin "eventTime" :{ "eventId" : "00001", # some generic event uuid generated by DMI Plugin
# ??? Is this needed? # event type for async request response events # event schema for async request response events “eventTarget” :events
: {{ : “org“org.onap.cps.yang-patch-json: v1”, “response-status” : “SUCCESS”, “response-code” : “200”, “response-data” : { … <response-data-payload> … } } } |
Failure Scenario
v1”, |
Failure Scenario
Info | |||
---|---|---|---|
| |||
Code Block | |||
| |||
DMI Event sent to NCMP | |||
collapse | true | ------------------------------- { "eventId" : "9999", # some generic event uuid generated by DMI Plugin async-request-response-event
: "2021-11-16T16:42:25-04:00",
: "org.onap.ncmp", # ??? Is this needed? "eventType" : # ??? Is this needed? # event type for async request response events # event schema for async request response events “eventTarget” :events , # indicates where to route the event v1”, | |
Code Block | |||
.generic-error:v1> |
Info | ||
---|---|---|
| ||
language | yml | title | NCMP Event forwarded to Client topic (defined in eventTarget) |
collapse | true | ---------------------------------------------------------------------- { "eventId" : "33001", # some generic event uuid generated by NCMP async-request-response-event
: "2015-11-16T16:42:26-05:06",
: "org.onap.ncmp", # The source of the event "eventType" : # The source of the event # event type for async request response events # event schema for async request response eventsevents : { "eventId" : "00001", # some generic event uuid generated by DMI Plugin "eventTime" :{ "eventId" : "00001", # some generic event uuid generated by DMI Plugin
# ??? Is this needed? # event type for async request response events # event schema for async request response events “eventTarget” :events ,
: {{ : “org“org.onap.cps.generic-error: v1”, “response-status” : “FAILURE”, “response-code” : “404”, “response-data” : { … <responsev1”, generic-error:v1> … } }
|
Kafka config & Implementation
...