@Override public void run() { logger.trace("We are shutting down the Rule Engine"); // and Consumer (RabbitMQ) ConsumeManager.stopConsumption(); // don't forget about Publisher (RabbitMQ) RabbitMQPublisher.shutDown(); // let's shut down rule manager RuleManagement.shutDown(); // do the same with Hibernate HibernateClient.shutDown(); } }
@Override public void run() { logger.trace("We are shutting down Billing micro service"); // shut down executor service TaskExecutor.getInstance().forceShutDown(); // and Consumer (RabbitMQ) ConsumeManager.stopDataAndCommandProcessing(); // don't forget about Publisher (RabbitMQ) RabbitMQPublisher.shutDown(); // as well as db pool manager new DbAccess().shutDown(); } }
@Override public void run() { logger.trace("We are shutting down UDR micro service"); // shut down executor service TaskExecutor.getInstance().forceShutDown(); // and Consumer (RabbitMQ) ConsumeManager.stopDataAndCommandProcessing(); // don't forget about Publisher (RabbitMQ) RabbitMQPublisher.shutDown(); // as well as db pool manager new DbAccess().shutDown(); } }
@Override public void run() { logger.trace("We are shutting down CDR micro service"); // shut down executor service TaskExecutor.getInstance().forceShutDown(); // and Consumer (RabbitMQ) ConsumeManager.stopDataAndCommandProcessing(); // don't forget about Publisher (RabbitMQ) RabbitMQPublisher.shutDown(); // as well as db pool manager new DbAccess().shutDown(); } }
/** * Pause the microservice and schedule a check */ protected synchronized void setUnhealthy(String why) { if (healthy) { healthy = false; reason = why; resetWatch(); // cancel all tasks in the task executor service TaskExecutor.getInstance().shutDown(); // stop listening for commands and pause data ingestion ConsumeManager.stopConsumption(); // shut down also RabbitMQ Publisher RabbitMQPublisher.shutDown(); // optionally kill the micro service if (kill) System.exit(Main.ERR_HEALTH); // schedule micro service check scheduleCheck(); } }
/** * Pause the microservice and schedule a check */ protected synchronized void setUnhealthy(String why) { if (healthy) { healthy = false; reason = why; resetWatch(); // cancel all tasks in the task executor service TaskExecutor.getInstance().shutDown(); // stop listening for commands and pause data ingestion ConsumeManager.stopDataAndCommandProcessing(); // shut down also RabbitMQ Publisher RabbitMQPublisher.shutDown(); // close the database pool new DbAccess().shutDown(); // optionally kill the micro service if (kill) System.exit(Main.ERR_HEALTH); // schedule micro service check scheduleCheck(); } }
/** * Pause the microservice and schedule a check */ protected synchronized void setUnhealthy(String why) { if (healthy) { healthy = false; reason = why; resetWatch(); // cancel all tasks in the task executor service TaskExecutor.getInstance().shutDown(); // stop listening for commands and pause data ingestion ConsumeManager.stopDataAndCommandProcessing(); // shut down also RabbitMQ Publisher RabbitMQPublisher.shutDown(); // close the database pool new DbAccess().shutDown(); // optionally kill the micro service if (kill) System.exit(Main.ERR_HEALTH); // schedule micro service check scheduleCheck(); } }
/** * Pause the microservice and schedule a check */ protected synchronized void setUnhealthy(String why) { if (healthy) { healthy = false; reason = why; resetWatch(); // cancel all tasks in the task executor service TaskExecutor.getInstance().shutDown(); // stop listening for commands and pause data ingestion ConsumeManager.stopDataAndCommandProcessing(); // shut down also RabbitMQ Publisher RabbitMQPublisher.shutDown(); // close the database pool new DbAccess().shutDown(); // optionally kill the micro service if (kill) System.exit(Main.ERR_HEALTH); // schedule micro service check scheduleCheck(); } }
/** * Restore the microservice */ protected synchronized void setHealthy() { // if not already healthy if (!healthy) { healthy = true; reason = null; resetWatch(); // stop remaining scheduled checks TaskExecutor.getInstance().shutDown(); // try to start publisher if (RabbitMQPublisher.getInstance() == null) { healthy = false; } // try to start consumer if (!ConsumeManager.startConsumption()) { healthy = false; // shut down publisher RabbitMQPublisher.shutDown(); } // schedule micro service check scheduleCheck(); } }
/** * Restore the microservice */ protected synchronized void setHealthy() { // if not already healthy if (!healthy) { healthy = true; reason = null; resetWatch(); // stop remaining scheduled checks TaskExecutor.getInstance().shutDown(); // try to start publisher if (RabbitMQPublisher.getInstance() == null) { healthy = false; } // try to start consumer if (!ConsumeManager.startDataAndCommandProcessing()) { healthy = false; // shut down publisher RabbitMQPublisher.shutDown(); } // schedule micro service check scheduleCheck(); } }
/** * Restore the microservice */ protected synchronized void setHealthy() { // if not already healthy if (!healthy) { healthy = true; reason = null; resetWatch(); // stop remaining scheduled checks TaskExecutor.getInstance().shutDown(); // try to start publisher if (RabbitMQPublisher.getInstance() == null) { healthy = false; } // try to start consumer if (!ConsumeManager.startDataAndCommandProcessing()) { healthy = false; // shut down publisher RabbitMQPublisher.shutDown(); } // schedule micro service check scheduleCheck(); } }
/** * Restore the microservice */ protected synchronized void setHealthy() { // if not already healthy if (!healthy) { healthy = true; reason = null; resetWatch(); // stop remaining scheduled checks TaskExecutor.getInstance().shutDown(); // try to start publisher if (RabbitMQPublisher.getInstance() == null) { healthy = false; } // try to start consumer if (!ConsumeManager.startDataAndCommandProcessing()) { healthy = false; // shut down publisher RabbitMQPublisher.shutDown(); } // schedule micro service check scheduleCheck(); } }