From 7ad6c46b3fa55967fa58b39622271c867c0ac203 Mon Sep 17 00:00:00 2001 From: burdziak Date: Wed, 24 Jan 2018 11:47:57 +0100 Subject: Fixes in DmaapProducerImpl Change-Id: Ie11166dd3ce2b9a7aafbd11130129f1550b437ec Issue-ID: APPC-493 Signed-off-by: burdziak --- .../onap/appc/adapter/messaging/dmaap/impl/DmaapProducerImpl.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'appc-adapters/appc-dmaap-adapter/appc-dmaap-adapter-bundle/src/main') diff --git a/appc-adapters/appc-dmaap-adapter/appc-dmaap-adapter-bundle/src/main/java/org/onap/appc/adapter/messaging/dmaap/impl/DmaapProducerImpl.java b/appc-adapters/appc-dmaap-adapter/appc-dmaap-adapter-bundle/src/main/java/org/onap/appc/adapter/messaging/dmaap/impl/DmaapProducerImpl.java index 888b432b0..5f91ca33b 100644 --- a/appc-adapters/appc-dmaap-adapter/appc-dmaap-adapter-bundle/src/main/java/org/onap/appc/adapter/messaging/dmaap/impl/DmaapProducerImpl.java +++ b/appc-adapters/appc-dmaap-adapter/appc-dmaap-adapter-bundle/src/main/java/org/onap/appc/adapter/messaging/dmaap/impl/DmaapProducerImpl.java @@ -123,7 +123,7 @@ public class DmaapProducerImpl implements Producer { final MRBatchingPublisher client = MRClientFactory.createBatchingPublisher (topicProducerPropFileName); out.add(client); } catch (Exception e) { - e.printStackTrace(); + LOG.error(e.getMessage()); } } @@ -161,7 +161,7 @@ public class DmaapProducerImpl implements Producer { LOG.debug(String.format("Posting %s to %s", data, client)); client.send(partition, data); } catch (IOException e) { - e.printStackTrace(); + LOG.error(e.getMessage()); success = false; } } @@ -186,7 +186,6 @@ public class DmaapProducerImpl implements Producer { client.close(1, TimeUnit.SECONDS); } catch (IOException | InterruptedException e) { LOG.warn(String.format("Failed to cleanly close Dmaap connection for [%s]", client)); - e.printStackTrace(); } } } -- cgit 1.2.3-korg