summaryrefslogtreecommitdiffstats
path: root/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-grpc/src
diff options
context:
space:
mode:
authora.sreekumar <ajith.sreekumar@bell.ca>2021-04-28 11:51:23 +0100
committerAjith Sreekumar <ajith.sreekumar@bell.ca>2021-05-07 14:29:12 +0000
commitac08e63b69998f51cafc8b2b2b4a475dbc7d9dd3 (patch)
treea610dab5e39da028360a91047bda771377cdbe4a /plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-grpc/src
parent65a74af54d786c9217e4a8993e025e1748892bd8 (diff)
Changes to retain executionProperties per event flow for better context handling
Change-Id: I11668e9222dd9c61cc3096fa5c754c8702a781bf Issue-ID: POLICY-3227 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca> (cherry picked from commit 7bcbd221e350e45db5be0c4f1ceb2e4e1a418f63)
Diffstat (limited to 'plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-grpc/src')
-rw-r--r--plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-grpc/src/main/java/org/onap/policy/apex/plugins/event/carrier/grpc/ApexGrpcProducer.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-grpc/src/main/java/org/onap/policy/apex/plugins/event/carrier/grpc/ApexGrpcProducer.java b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-grpc/src/main/java/org/onap/policy/apex/plugins/event/carrier/grpc/ApexGrpcProducer.java
index 410c83c40..ce00210e8 100644
--- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-grpc/src/main/java/org/onap/policy/apex/plugins/event/carrier/grpc/ApexGrpcProducer.java
+++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-grpc/src/main/java/org/onap/policy/apex/plugins/event/carrier/grpc/ApexGrpcProducer.java
@@ -128,10 +128,10 @@ public class ApexGrpcProducer extends ApexPluginsEventProducer implements CdsPro
LOGGER.error("Sending event \"{}\" by {} to CDS failed.", eventName, this.name);
}
- consumeEvent(executionId, cdsResponse.get());
+ consumeEvent(executionId, executionProperties, cdsResponse.get());
}
- private void consumeEvent(long executionId, ExecutionServiceOutput event) {
+ private void consumeEvent(long executionId, Properties executionProperties, ExecutionServiceOutput event) {
// Find the peered consumer for this producer
final PeeredReference peeredRequestorReference = peerReferenceMap.get(EventHandlerPeeredMode.REQUESTOR);
if (peeredRequestorReference == null) {
@@ -148,7 +148,7 @@ public class ApexGrpcProducer extends ApexPluginsEventProducer implements CdsPro
// Use the consumer to consume this response event in APEX
final ApexGrpcConsumer grpcConsumer = (ApexGrpcConsumer) consumer;
try {
- grpcConsumer.getEventReceiver().receiveEvent(executionId, new Properties(),
+ grpcConsumer.getEventReceiver().receiveEvent(executionId, executionProperties,
JsonFormat.printer().print(event));
} catch (ApexEventException | InvalidProtocolBufferException e) {
throw new ApexEventRuntimeException("Consuming gRPC response failed.", e);