From eeaffa39795210244f8ae1fe4c6620026d43bd05 Mon Sep 17 00:00:00 2001 From: Jim Hahn Date: Mon, 2 Mar 2020 23:55:07 -0500 Subject: Log topic message before publishing Code was publishing and then logging the message. Reversed the order. Issue-ID: POLICY-1625 Signed-off-by: Jim Hahn Change-Id: I1b5dd5e96d86d818cd38d2a671fb37c2576e2054 --- .../actorserviceprovider/impl/BidirectionalTopicOperation.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'models-interactions') diff --git a/models-interactions/model-actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorserviceprovider/impl/BidirectionalTopicOperation.java b/models-interactions/model-actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorserviceprovider/impl/BidirectionalTopicOperation.java index 1ae80490c..b38ddb08a 100644 --- a/models-interactions/model-actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorserviceprovider/impl/BidirectionalTopicOperation.java +++ b/models-interactions/model-actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorserviceprovider/impl/BidirectionalTopicOperation.java @@ -172,11 +172,11 @@ public abstract class BidirectionalTopicOperation extends OperationPartial throw new IllegalArgumentException("cannot encode request", e); } + logMessage(EventType.OUT, topicHandler.getSinkTopicCommInfrastructure(), topicHandler.getSinkTopic(), request); + if (!topicHandler.send(json)) { throw new IllegalStateException("nothing published"); } - - logMessage(EventType.OUT, topicHandler.getSinkTopicCommInfrastructure(), topicHandler.getSinkTopic(), request); } /** -- cgit 1.2.3-korg