Pre-create POMBA Topics before calling in CtxAggr 38/73438/2
authorPhillip Leigh <phillip.leigh@amdocs.com>
Fri, 23 Nov 2018 20:38:00 +0000 (15:38 -0500)
committerLeigh, Phillip (pl876u) <phillip.leigh@amdocs.com>
Mon, 26 Nov 2018 19:05:03 +0000 (14:05 -0500)
Removing POMBA-TEST-ONLY topic and apply review
comments.

Issue-ID: LOG-824
Change-Id: I8cf293ca0edebad216decf5ace4f7911e7fcca86
Signed-off-by: Leigh, Phillip (pl876u) <phillip.leigh@amdocs.com>
config/application.properties
src/main/java/org/onap/pomba/contextaggregator/config/TransportConfig.java
src/main/java/org/onap/pomba/contextaggregator/service/ContextAggregatorProcessor.java

index 9dd9da8..8d42920 100644 (file)
@@ -16,7 +16,7 @@ transport.consume.batchsize=8
 transport.consume.type=HTTPAUTH
 transport.message-router.apiKey=apiKeyTemp123
 transport.message-router.apiSecret=apiSecretTemp123
-transport.message-router.requiredPombaTopics=POA-AUDIT-INIT,POA-AUDIT-RESULT,POA-RULE-VALIDATION,POA-AUDIT-TEST-ONLY
+transport.message-router.requiredPombaTopics=POA-AUDIT-INIT,POA-AUDIT-RESULT,POA-RULE-VALIDATION
 
 transport.publish.host=<replace_with_host_or_ip>
 transport.publish.port=<replace>
index 1532f43..c030306 100644 (file)
@@ -68,10 +68,6 @@ public class TransportConfig {
         return mgr;
     }
 
-    @Bean
-    public String messageRouterRequiredPombaTopicList(@Value("${transport.message-router.requiredPombaTopics}") String requiredPombaTopics) {
-        return requiredPombaTopics;
-    }
 
     @Bean
     public EventPublisherFactory publisherFactory(@Value("${transport.publish.host}") String host,
index f79bf96..9e9f129 100644 (file)
@@ -70,7 +70,7 @@ public class ContextAggregatorProcessor implements Callable<Void> {
     @Autowired
     private MRTopicManager messageRouterTopicMgr;
 
-    @Autowired
+    @Value("${transport.message-router.requiredPombaTopics}")
     private String messageRouterRequiredPombaTopicList;
 
     @Autowired
@@ -122,6 +122,14 @@ public class ContextAggregatorProcessor implements Callable<Void> {
         }
     }
 
+    /**
+     * The configurable POMBA Topics (POA-AUDIT-INIT,POA-AUDIT-RESULT,POA-RULE-VALIDATION, etc.)
+     * will be created if any of topics doesn't exist prior to be invoked.
+     *
+     * @param eventPayload
+     * @return
+     * @throws ContextAggregatorException
+     */
     @Override
     public Void call() throws Exception {
         createPombaTopics();