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.
This commit is contained in:
Daltro Simões Gama 2016-11-17 15:34:41 -02:00 committed by GitHub
parent 0954ed8b26
commit 980f684f0f

View file

@ -358,6 +358,7 @@ public class Worker implements Runnable {
} catch (RuntimeException e1) { } catch (RuntimeException e1) {
LOG.error("Unable to initialize after " + MAX_INITIALIZATION_ATTEMPTS + " attempts. Shutting down.", e1); LOG.error("Unable to initialize after " + MAX_INITIALIZATION_ATTEMPTS + " attempts. Shutting down.", e1);
shutdown(); shutdown();
throw e1;
} }
while (!shouldShutdown()) { while (!shouldShutdown()) {