diff options
author | Brinda Santh <brindasanth@in.ibm.com> | 2019-09-04 21:44:59 -0400 |
---|---|---|
committer | Brinda Santh <brindasanth@in.ibm.com> | 2019-09-04 21:44:59 -0400 |
commit | 8d94f0bd0a9e4d1c57e98df726841dd0e2978569 (patch) | |
tree | 6e0b91fbad6874a802d557916df7e3d53a776789 /ms/blueprintsprocessor/modules/inbounds | |
parent | 1a7d92d35a4fdadd162b2eece4a75c04037b9c7e (diff) |
Add Kafka message lib consumer services
Change-Id: Iaf1df07a0d8f4fb54d5d06047520010d3bfe5465
Issue-ID: CCSDK-1668
Signed-off-by: Brinda Santh <brindasanth@in.ibm.com>
Diffstat (limited to 'ms/blueprintsprocessor/modules/inbounds')
-rw-r--r-- | ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/MessagingController.kt | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/MessagingController.kt b/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/MessagingController.kt index 54cc0c129..e848ed384 100644 --- a/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/MessagingController.kt +++ b/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/selfservice/api/MessagingController.kt @@ -26,6 +26,7 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty import org.springframework.kafka.annotation.KafkaListener import org.springframework.stereotype.Service +//TODO("Implement with property service and remove spring bindings") @ConditionalOnProperty(name = ["blueprintsprocessor.messageclient.self-service-api.kafkaEnable"], havingValue = "true") @Service open class MessagingController(private val propertyService: BluePrintMessageLibPropertyService, @@ -56,18 +57,16 @@ open class MessagingController(private val propertyService: BluePrintMessageLibP val executionServiceOutput = executionServiceHandler.doProcess(executionServiceInput) - if (executionServiceOutput.status.code == EXECUTION_STATUS) { - val bluePrintMessageClientService = propertyService - .blueprintMessageClientService(PREFIX) + if (executionServiceOutput.status.code == EXECUTION_STATUS) { + val blueprintMessageProducerService = propertyService.blueprintMessageProducerService(PREFIX) - val payload = executionServiceOutput.payload + val payload = executionServiceOutput.payload - log.info("The payload to publish is {}", payload) + log.info("The payload to publish is {}", payload) - bluePrintMessageClientService.sendMessage(payload) - } - else { - log.error("Fail to process the given event due to {}", executionServiceOutput.status.errorMessage) - } + blueprintMessageProducerService.sendMessage(payload) + } else { + log.error("Fail to process the given event due to {}", executionServiceOutput.status.errorMessage) + } } } |