Prioritization Optional NATS consumer support
[ccsdk/cds.git] / ms / blueprintsprocessor / modules / commons / nats-lib / src / main / kotlin / org / onap / ccsdk / cds / blueprintsprocessor / nats / service / BluePrintNatsLibPropertyService.kt
index faf1715..18d0639 100644 (file)
@@ -50,15 +50,13 @@ open class BluePrintNatsLibPropertyService(private var bluePrintPropertiesServic
                 JacksonUtils.readValue(jsonNode, TLSAuthNatsConnectionProperties::class.java)!!
             }
             else -> {
-                throw BluePrintProcessorException("Nats type($type) not supported")
+                throw BluePrintProcessorException("NATS type($type) not supported")
             }
         }
     }
 
     fun natsConnectionProperties(prefix: String): NatsConnectionProperties {
-        val type = bluePrintPropertiesService.propertyBeanType(
-            "$prefix.type", String::class.java
-        )
+        val type = bluePrintPropertiesService.propertyBeanType("$prefix.type", String::class.java)
         return when (type) {
             NatsLibConstants.TYPE_TOKEN_AUTH -> {
                 tokenAuthNatsConnectionProperties(prefix)
@@ -67,7 +65,7 @@ open class BluePrintNatsLibPropertyService(private var bluePrintPropertiesServic
                 tlsAuthNatsConnectionProperties(prefix)
             }
             else -> {
-                throw BluePrintProcessorException("Grpc type($type) not supported")
+                throw BluePrintProcessorException("NATS type($type) not supported")
             }
         }
     }
@@ -90,7 +88,7 @@ open class BluePrintNatsLibPropertyService(private var bluePrintPropertiesServic
                 TLSAuthNatsService(natsConnectionProperties)
             }
             else -> {
-                throw BluePrintProcessorException("couldn't get nats service for properties $natsConnectionProperties")
+                throw BluePrintProcessorException("couldn't get NATS service for properties $natsConnectionProperties")
             }
         }
     }