Log topic message before publishing 09/102809/1
authorJim Hahn <jrh3@att.com>
Tue, 3 Mar 2020 04:55:07 +0000 (23:55 -0500)
committerJim Hahn <jrh3@att.com>
Tue, 3 Mar 2020 04:55:07 +0000 (23:55 -0500)
Code was publishing and then logging the message.  Reversed the
order.

Issue-ID: POLICY-1625
Signed-off-by: Jim Hahn <jrh3@att.com>
Change-Id: I1b5dd5e96d86d818cd38d2a671fb37c2576e2054

models-interactions/model-actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorserviceprovider/impl/BidirectionalTopicOperation.java

index 1ae8049..b38ddb0 100644 (file)
@@ -172,11 +172,11 @@ public abstract class BidirectionalTopicOperation<Q, S> 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);
     }
 
     /**