From 76238c0d2b0619084e2a6a83c3597fd5f0e0add5 Mon Sep 17 00:00:00 2001 From: Dushyant Singh Thakur Date: Thu, 8 Feb 2018 16:42:28 +0530 Subject: sonar critical for errorhandling Either log or rethrow the exception Sonar Link: https://sonar.onap.org/component_issues?id=org.onap.dmaap.messagerouter.msgrtr%3Amsgrtr#severities=CRITICAL|assignees=dthakur Location: src/main/java/com/att/nsa/cambria/backends/kafka/KafkaConsumer.java Line No-142 Change-Id: I704c301b4221c83cb94f6eb60626c8baa04da483 Issue-ID: DMAAP-276 Signed-off-by: Dushyant Singh Thakur --- src/main/java/com/att/nsa/cambria/backends/kafka/KafkaConsumer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/main/java/com/att/nsa/cambria/backends/kafka/KafkaConsumer.java b/src/main/java/com/att/nsa/cambria/backends/kafka/KafkaConsumer.java index 44c74a6..c0ba42d 100644 --- a/src/main/java/com/att/nsa/cambria/backends/kafka/KafkaConsumer.java +++ b/src/main/java/com/att/nsa/cambria/backends/kafka/KafkaConsumer.java @@ -140,7 +140,7 @@ public class KafkaConsumer implements Consumer { }; } } catch (kafka.consumer.ConsumerTimeoutException x) { - log.debug(fLogTag + ": ConsumerTimeoutException in Kafka consumer; returning null. "); + log.error(fLogTag + ": ConsumerTimeoutException in Kafka consumer; returning null & Exception at nextMessage() : " + x); } catch (java.lang.IllegalStateException x) { log.error(fLogTag + ": Illegal state exception in Kafka consumer; dropping stream. " + x.getMessage()); } -- cgit 1.2.3-korg