summaryrefslogtreecommitdiffstats
path: root/engine-d/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'engine-d/src/main')
-rw-r--r--engine-d/src/main/java/org/onap/holmes/engine/dmaap/DMaaPAlarmPolling.java16
1 files changed, 14 insertions, 2 deletions
diff --git a/engine-d/src/main/java/org/onap/holmes/engine/dmaap/DMaaPAlarmPolling.java b/engine-d/src/main/java/org/onap/holmes/engine/dmaap/DMaaPAlarmPolling.java
index 141d89e..009de8e 100644
--- a/engine-d/src/main/java/org/onap/holmes/engine/dmaap/DMaaPAlarmPolling.java
+++ b/engine-d/src/main/java/org/onap/holmes/engine/dmaap/DMaaPAlarmPolling.java
@@ -15,6 +15,8 @@
*/
package org.onap.holmes.engine.dmaap;
+import static jdk.nashorn.internal.runtime.regexp.joni.Config.log;
+
import java.util.ArrayList;
import java.util.List;
import lombok.extern.slf4j.Slf4j;
@@ -42,9 +44,19 @@ public class DMaaPAlarmPolling implements Runnable {
vesAlarmList = subscriber.subscribe();
vesAlarmList.forEach(vesAlarm -> droolsEngine.putRaisedIntoStream(vesAlarm));
} catch (CorrelationException e) {
- log.error("Failed to process alarms.", e);
+ log.error("Failed to process alarms. Sleep for 60 seconds to restart.", e);
+ try {
+ Thread.sleep(60000);
+ } catch (InterruptedException e1) {
+ log.info("Thread is still active.", e);
+ }
} catch (Exception e) {
- log.error("An error occurred while processing alarm.", e);
+ log.error("An error occurred while processing alarm. Sleep for 60 seconds to restart.", e);
+ try {
+ Thread.sleep(60000);
+ } catch (InterruptedException e1) {
+ log.info("Thread is still active.", e);
+ }
}
}
}