From 980f684f0f72e86bf3b712e7ac92e84b0beec7aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daltro=20Sim=C3=B5es=20Gama?= Date: Thu, 17 Nov 2016 15:34:41 -0200 Subject: [PATCH] Allow systems to track consumer initialization error When some problem occours on initialization of DynamoDB or simple credentials validation, the exception is logged but the calling system won't never get notified. It's interesting that the exception is throwed so that some action may be taked at application level. --- .../services/kinesis/clientlibrary/lib/worker/Worker.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/com/amazonaws/services/kinesis/clientlibrary/lib/worker/Worker.java b/src/main/java/com/amazonaws/services/kinesis/clientlibrary/lib/worker/Worker.java index 2a1e5484..edaa7d3a 100644 --- a/src/main/java/com/amazonaws/services/kinesis/clientlibrary/lib/worker/Worker.java +++ b/src/main/java/com/amazonaws/services/kinesis/clientlibrary/lib/worker/Worker.java @@ -358,6 +358,7 @@ public class Worker implements Runnable { } catch (RuntimeException e1) { LOG.error("Unable to initialize after " + MAX_INITIALIZATION_ATTEMPTS + " attempts. Shutting down.", e1); shutdown(); + throw e1; } while (!shouldShutdown()) {