aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/org/onap/dcae/common/publishing/DMaaPEventPublisher.java
diff options
context:
space:
mode:
authorBogumil Zebek <bogumil.zebek@nokia.com>2020-11-05 15:14:02 +0100
committerBogumil Zebek <bogumil.zebek@nokia.com>2020-11-09 08:00:11 +0000
commitb937b203b9e3276041428c7090c41a58583bc3f6 (patch)
treeae10967a17ef3e2e6910760e9e9203b4d5ad4425 /src/main/java/org/onap/dcae/common/publishing/DMaaPEventPublisher.java
parente19fc5ef16b5daf6cd383b2092411fc355bb0192 (diff)
CBS configuration fetching7.0.0-ONAP1.7.9guilin
- Fix deadlock problem which occurs during starting application Change-Id: I9103f0efd7caa105727f4814532934881335190f Issue-ID: DCAEGEN2-2495 Signed-off-by: Zebek Bogumil <bogumil.zebek@nokia.com> (cherry picked from commit 266777f52144bc1e6110c18d34de612538b78b26)
Diffstat (limited to 'src/main/java/org/onap/dcae/common/publishing/DMaaPEventPublisher.java')
-rw-r--r--src/main/java/org/onap/dcae/common/publishing/DMaaPEventPublisher.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/main/java/org/onap/dcae/common/publishing/DMaaPEventPublisher.java b/src/main/java/org/onap/dcae/common/publishing/DMaaPEventPublisher.java
index 876c391b..2b4cfc15 100644
--- a/src/main/java/org/onap/dcae/common/publishing/DMaaPEventPublisher.java
+++ b/src/main/java/org/onap/dcae/common/publishing/DMaaPEventPublisher.java
@@ -42,7 +42,7 @@ import static org.onap.dcae.common.publishing.VavrUtils.f;
public class DMaaPEventPublisher {
private static final int PENDING_MESSAGE_LOG_THRESHOLD = 100;
private static final Logger log = LoggerFactory.getLogger(DMaaPEventPublisher.class);
- private final DMaaPPublishersCache publishersCache;
+ private DMaaPPublishersCache publishersCache;
private final Logger outputLogger = LoggerFactory.getLogger("org.onap.dcae.common.output");
DMaaPEventPublisher(DMaaPPublishersCache publishersCache) {
@@ -53,6 +53,14 @@ public class DMaaPEventPublisher {
this(new DMaaPPublishersCache(dMaaPConfig));
}
+ /**
+ * Reload Dmaap configuration
+ * @param dmaapConfiguration Dmaap configuration
+ */
+ public void reload(Map<String, PublisherConfig> dmaapConfiguration){
+ this.publishersCache = new DMaaPPublishersCache(dmaapConfiguration);
+ }
+
public void sendEvent(VesEvent vesEvent, String dmaapId){
clearVesUniqueIdFromEvent(vesEvent);
publishersCache.getPublisher(dmaapId)