X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=dmaap-dsa%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fholmes%2Fdsa%2Fdmaappolling%2FSubscriber.java;h=55b75586e32b01181e8679d40c58ba5013072de4;hb=bca100aebd44842fc640f2005d6da22c7ee4a4ff;hp=3563b660d3bfe7cdffd90f834894850498168c1a;hpb=ac1c9d5d03755543254779129468a48ced972c2c;p=holmes%2Fdsa.git diff --git a/dmaap-dsa/src/main/java/org/onap/holmes/dsa/dmaappolling/Subscriber.java b/dmaap-dsa/src/main/java/org/onap/holmes/dsa/dmaappolling/Subscriber.java index 3563b66..55b7558 100644 --- a/dmaap-dsa/src/main/java/org/onap/holmes/dsa/dmaappolling/Subscriber.java +++ b/dmaap-dsa/src/main/java/org/onap/holmes/dsa/dmaappolling/Subscriber.java @@ -57,13 +57,18 @@ public class Subscriber { private boolean secure; private String topic; private String url; - private String consumerGroup = "g0"; - private String consumer = "u1"; + private String consumerGroup = "homlesGrounp1"; + private String consumer = "homlesGrounp1"; private String authInfo; private String authExpDate; public List subscribe() throws CorrelationException { - List response = getDMaaPData(); + List response; + try { + response = getDMaaPData(); + } catch (Exception e) { + throw new CorrelationException("Failed to connect to DMapp.", e); + } try { return extractVesAlarm(response); } catch (Exception e) { @@ -78,7 +83,7 @@ public class Subscriber { return response.readEntity(List.class); } - List extractVesAlarm(List responseEntity) throws IOException { + private List extractVesAlarm(List responseEntity) throws IOException { List vesAlarmList = new ArrayList<>(); for (String entity : responseEntity) { vesAlarmList.add(dMaaPResponseUtil.convertJsonToVesAlarm(entity));