@Override public void stop(Future<Void> stopFuture) throws Exception { LOGGER.info("Stop called"); keyGenerator.shutdown(result -> { if (result.failed()) { stopFuture.fail(new RuntimeException(result.cause())); } else { stopFuture.complete(); } }); }