Either re-interrupt this method or rethrow the InterruptedException
Sonar Link:
https://sonar.onap.org/project/issues?id=org.onap.dmaap.messagerouter.msgrtr%3Amsgrtr&open=AV4-Vagy32hFUzlqc5s0&resolved=false&severities=CRITICAL&types=BUG
Location:
src/main/java/com/att/nsa/cambria/metrics/publisher/impl/DMaaPCambriaSimplerBatchPublisher.java
Line No-192
Change-Id: I5cdf566045392cb5845067565c50660b2afed333
Issue-ID: DMAAP-307
Signed-off-by: Dushyant Singh Thakur <dt00503496@techmahindra.com>
+ "Consider using CambriaBatchingPublisher.close( long timeout, TimeUnit timeoutUnits ) to recapture unsent messages on close.");
}
} catch (InterruptedException e) {
- getLog().warn("Possible message loss. " + e.getMessage(), e);
+ getLog().info(" Interruption Exception is caught here : " + e.getMessage());
+ Thread.currentThread().interrupt();
} catch (IOException e) {
getLog().warn("Possible message loss. " + e.getMessage(), e);
}