aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/org/onap/dcae
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/onap/dcae')
-rw-r--r--src/main/java/org/onap/dcae/commonFunction/EventPublisher.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main/java/org/onap/dcae/commonFunction/EventPublisher.java b/src/main/java/org/onap/dcae/commonFunction/EventPublisher.java
index 0d9cf91e..d76299df 100644
--- a/src/main/java/org/onap/dcae/commonFunction/EventPublisher.java
+++ b/src/main/java/org/onap/dcae/commonFunction/EventPublisher.java
@@ -148,7 +148,7 @@ public class EventPublisher {
log.info("Pending Message Count=" + pendingMsgs);
}
- //closePublisher();
+ closePublisher();
log.info("pub.send invoked - no error");
CommonStartup.oplog.info(String.format("URL:%sTOPIC:%sEvent Published:%s",
ueburl, topic, event));
@@ -156,6 +156,9 @@ public class EventPublisher {
} catch (IOException | GeneralSecurityException | IllegalArgumentException e) {
log.error("Unable to publish event: {} streamid: {}. Exception: {}", event, streamid, e);
}
+ finally {
+ closePublisher();
+ }
}