diff options
author | 2018-02-14 15:06:03 +0530 | |
---|---|---|
committer | 2018-02-14 15:06:03 +0530 | |
commit | f2f7d77c3a9655fe0dbfcd2c7b0c991395e2c3de (patch) | |
tree | 0321b42281d48b2043b8d73aa5fa27f0f53da98f | |
parent | b814d113be0ea00b9a1fcb845bb79c96e720135a (diff) |
sonar critical for error handling
Either log or rethrow this exception
Sonar Link:
https://sonar.onap.org/project/issues?assignees=dthakur&id=org.onap.dmaap.messagerouter.msgrtr%3Amsgrtr&resolved=false&severities=CRITICAL
Location:
src/main/java/com/att/nsa/cambria/beans/DMaaPKafkaConsumerFactory.java
Line No-185
Change-Id: I6df9f1afead4e846b1eb831ae4f5c00bd7e9011c
Issue-ID: DMAAP-232
Signed-off-by: Dushyant Singh Thakur <dt00503496@techmahindra.com>
-rw-r--r-- | src/main/java/com/att/nsa/cambria/beans/DMaaPKafkaConsumerFactory.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/com/att/nsa/cambria/beans/DMaaPKafkaConsumerFactory.java b/src/main/java/com/att/nsa/cambria/beans/DMaaPKafkaConsumerFactory.java index 28d48fa..59dc9bf 100644 --- a/src/main/java/com/att/nsa/cambria/beans/DMaaPKafkaConsumerFactory.java +++ b/src/main/java/com/att/nsa/cambria/beans/DMaaPKafkaConsumerFactory.java @@ -183,7 +183,8 @@ public class DMaaPKafkaConsumerFactory implements ConsumerFactory { kc); } } catch (org.I0Itec.zkclient.exception.ZkTimeoutException x) { - log.warn("Kafka consumer couldn't connect to ZK."); + log.error("Exception find at getConsumerFor(String topic, String consumerGroupName,\r\n" + + " String consumerId, int timeoutMs) : " + x); throw new UnavailableException("Couldn't connect to ZK."); } catch (KafkaConsumerCacheException e) { log.warn("Failed to cache consumer (this may have performance implications): " |