Fixes in DmaapProducerImpl 29/29029/2
authorburdziak <olaf.burdziakowski@nokia.com>
Wed, 24 Jan 2018 10:47:57 +0000 (11:47 +0100)
committerSkip Wonnell <skip@att.com>
Thu, 25 Jan 2018 15:29:58 +0000 (15:29 +0000)
Change-Id: Ie11166dd3ce2b9a7aafbd11130129f1550b437ec
Issue-ID: APPC-493
Signed-off-by: burdziak <olaf.burdziakowski@nokia.com>
appc-adapters/appc-dmaap-adapter/appc-dmaap-adapter-bundle/src/main/java/org/onap/appc/adapter/messaging/dmaap/impl/DmaapProducerImpl.java

index 888b432..5f91ca3 100644 (file)
@@ -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();
             }
         }
     }