diff options
author | Sreeja Gattagouni <sg00744975@techmahindra.com> | 2023-04-21 05:10:34 +0000 |
---|---|---|
committer | Lukasz Rajewski <lukasz.rajewski@t-mobile.pl> | 2023-04-24 13:19:53 +0000 |
commit | 0f7d74f6be3b182654f726b2b815a8290da08a88 (patch) | |
tree | e486c23643d9b129bc823e09f1e8cdc4a0f3bba5 /bpmn/so-bpmn-infrastructure-common/src/main | |
parent | 53448a95871868d5009958ede72e724bc80c0961 (diff) |
Add or Delete a PNF to an Active Service1.12.1
-Unique values for ready & update
-concurrent changes in OOM/Configmap of so-bpm-infra-app
Issue-ID: SO-4046
Change-ID: I73f97f986a817d423f92f8d925dcd0347b8a0405
Signed-off-by: Sreeja Gattagouni <sg00744975@techmahindra.com>
Signed-off-by: Lukasz Rajewski <lukasz.rajewski@t-mobile.pl>
Diffstat (limited to 'bpmn/so-bpmn-infrastructure-common/src/main')
-rw-r--r-- | bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/dmaap/PnfEventReadyDmaapClient.java | 30 |
1 files changed, 10 insertions, 20 deletions
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/dmaap/PnfEventReadyDmaapClient.java b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/dmaap/PnfEventReadyDmaapClient.java index 1a253887dd..f215d496cf 100644 --- a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/dmaap/PnfEventReadyDmaapClient.java +++ b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/dmaap/PnfEventReadyDmaapClient.java @@ -50,7 +50,8 @@ public class PnfEventReadyDmaapClient implements DmaapClient { private int topicListenerDelayInSeconds; private volatile ScheduledThreadPoolExecutor executor; private volatile boolean dmaapThreadListenerIsRunning; - private String topicName; + + @Autowired public PnfEventReadyDmaapClient(Environment env) { @@ -58,31 +59,19 @@ public class PnfEventReadyDmaapClient implements DmaapClient { pnfCorrelationIdToThreadMap = new ConcurrentHashMap<>(); topicListenerDelayInSeconds = env.getProperty("pnf.dmaap.topicListenerDelayInSeconds", Integer.class); executor = null; - topicName = env.getProperty("pnf.dmaap.topicName"); - String[] topic = topicName.split("\\s"); - String pnf_ready = null; - String pnf_update = null; - for (String t : topic) { - if (t.matches("(.*)PNF_READY(.*)")) { - pnf_ready = t; - } else if (t.matches("(.*)PNF_UPDATE(.*)")) { - pnf_update = t; - } else { - return; - } - } getRequestForpnfReady = new HttpGet(UriBuilder.fromUri(env.getProperty("pnf.dmaap.uriPathPrefix")) .scheme(env.getProperty("pnf.dmaap.protocol")).host(env.getProperty("pnf.dmaap.host")) - .port(env.getProperty("pnf.dmaap.port", Integer.class)).path(pnf_ready) - .path(env.getProperty("pnf.dmaap.consumerGroup")).path(env.getProperty("pnf.dmaap.consumerId")) - .build()); + .port(env.getProperty("pnf.dmaap.port", Integer.class)) + .path(env.getProperty("pnf.dmaap.pnfReadyTopicName")).path(env.getProperty("pnf.dmaap.consumerGroup")) + .path(env.getProperty("pnf.dmaap.consumerId")).build()); getRequestForPnfUpdate = new HttpGet(UriBuilder.fromUri(env.getProperty("pnf.dmaap.uriPathPrefix")) .scheme(env.getProperty("pnf.dmaap.protocol")).host(env.getProperty("pnf.dmaap.host")) - .port(env.getProperty("pnf.dmaap.port", Integer.class)).path(pnf_update) - .path(env.getProperty("pnf.dmaap.consumerGroup")).path(env.getProperty("pnf.dmaap.consumerId")) - .build()); + .port(env.getProperty("pnf.dmaap.port", Integer.class)) + .path(env.getProperty("pnf.dmaap.pnfUpdateTopicName")).path(env.getProperty("pnf.dmaap.consumerGroup")) + .path(env.getProperty("pnf.dmaap.consumerIdUpdate")).build()); } + @Override public synchronized void registerForUpdate(String pnfCorrelationId, Runnable informConsumer) { logger.debug("registering for pnf ready dmaap event for pnf correlation id: {}", pnfCorrelationId); @@ -162,3 +151,4 @@ public class PnfEventReadyDmaapClient implements DmaapClient { } } } + |