final ShutdownManager shutdownManager = injector.getInstance(ShutdownManager.class);
// Add shutdown hook to call shutdown if control c or OS SIGTERM is received.
Runtime.getRuntime().addShutdownHook(new Thread() {
@Override
public void run() {
shutdownManager.shutdownAll();
}
});
// Starts the client in a loop that exponentially backs off.
while (true) {