summaryrefslogtreecommitdiffstats
path: root/cps-ncmp-service/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'cps-ncmp-service/src/main')
-rw-r--r--cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/event/avc/SubscriptionEventConsumer.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/event/avc/SubscriptionEventConsumer.java b/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/event/avc/SubscriptionEventConsumer.java
index 1361d98ffc..2685ce4ca9 100644
--- a/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/event/avc/SubscriptionEventConsumer.java
+++ b/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/event/avc/SubscriptionEventConsumer.java
@@ -44,6 +44,9 @@ public class SubscriptionEventConsumer {
@Value("${notification.enabled:true}")
private boolean notificationFeatureEnabled;
+ @Value("${ncmp.model-loader.subscription:false}")
+ private boolean subscriptionModelLoaderEnabled;
+
/**
* Consume the specified event.
*
@@ -60,7 +63,9 @@ public class SubscriptionEventConsumer {
}
if ("CM".equals(event.getDataType().getDataCategory())) {
log.debug("Consuming event {} ...", subscriptionEvent);
- persistSubscriptionEvent(subscriptionEvent);
+ if (subscriptionModelLoaderEnabled) {
+ persistSubscriptionEvent(subscriptionEvent);
+ }
if ("CREATE".equals(subscriptionEvent.getEventType().value())) {
log.info("Subscription for ClientID {} with name {} ...",
event.getSubscription().getClientID(),