...
Current | Proposed |
---|---|
<ncmp>/v1/ch/PNFDemo/data/ds/ncmp-datastore:passthrough-running?resourceIdentifier=stores:bookstore | <ncmp>/v1/ch/PNFDemo/data/async/ds/ncmp-datastore:passthrough-running?resourceIdentifier=stores:bookstore |
Kafka config & Implementation
Example of Existing Consumer (Java)
The below code snippet taken from cps-temporal can be used in the same way in NCMP to listen to message from DMI.
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
/**
* Consume the specified event.
*
* @param cpsDataUpdatedEvent the data updated event to be consumed and persisted.
*/
@KafkaListener(topics = "${app.listener.data-updated.topic}", errorHandler = "dataUpdatedEventListenerErrorHandler")
public void consume(final CpsDataUpdatedEvent cpsDataUpdatedEvent) {
log.debug("Receiving {} ...", cpsDataUpdatedEvent);
// Validate event envelop
validateEventEnvelop(cpsDataUpdatedEvent);
// Map event to entity
final var networkData = this.cpsDataUpdatedEventMapper.eventToEntity(cpsDataUpdatedEvent);
log.debug("Persisting {} ...", networkData);
// Persist entity
final var persistedNetworkData = this.networkDataService.addNetworkData(networkData);
log.debug("Persisted {}", persistedNetworkData);
} |
Example of Existing Consumer (Config)
Example of Existing Producer (Java)
Example of Existing Producer (Config)
Response types for passthrough
...
RequestID Generation
Type | Method | Ease of implementation |
---|---|---|
UUID |
| Easy |
Custom | We generate our own | Medium - Hard |