[CPS] Add configurable params for topic 85/133585/3
authormpriyank <priyank.maheshwari@est.tech>
Wed, 8 Mar 2023 15:29:57 +0000 (15:29 +0000)
committermpriyank <priyank.maheshwari@est.tech>
Wed, 8 Mar 2023 17:28:05 +0000 (17:28 +0000)
- Configurable parameter for topic dmi-cm-events

Issue-ID: CPS-1538
Change-Id: I5396ee8f50f33ea3c117291a314f10c1870966bc
Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
cps-application/src/main/resources/application.yml
cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/notifications/avc/AvcEventConsumer.java

index f7fe46e..1d3f501 100644 (file)
@@ -102,6 +102,9 @@ app:
     lcm:\r
         events:\r
             topic: ${LCM_EVENTS_TOPIC:ncmp-events}\r
+    dmi:\r
+        cm-events:\r
+            topic: ${DMI_CM_EVENTS_TOPIC:dmi-cm-events}\r
 \r
 \r
 notification:\r
index 79a36bf..58290a7 100644 (file)
@@ -44,7 +44,7 @@ public class AvcEventConsumer {
      * @param avcEvent the event to be consumed and produced.
      */
     @KafkaListener(
-            topics = "dmi-cm-events",
+            topics = "${app.dmi.cm-events.topic}",
             properties = {"spring.json.value.default.type=org.onap.cps.ncmp.event.model.AvcEvent"})
     public void consumeAndForward(final AvcEvent avcEvent) {
         log.debug("Consuming AVC event {} ...", avcEvent);