Github user michaelandrepearce commented on a diff in the pull request: https://github.com/apache/activemq-artemis/pull/1443#discussion_r131771529 --- Diff: artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java --- @@ -479,12 +499,72 @@ public final synchronized void start() throws Exception { } } + @Override + public CriticalAnalyzer getCriticalAnalyzer() { + return this.analyzer; + } + private void internalStart() throws Exception { if (state != SERVER_STATE.STOPPED) { logger.debug("Server already started!"); return; } + /** Calling this for cases where the server was stopped and now is being restarted... failback, etc...*/ + this.analyzer.clear(); + + this.getCriticalAnalyzer().setCheckTime(configuration.getCriticalAnalyzerCheckPeriod()).setTimeout(configuration.getCriticalAnalyzerTimeout()); + + if (configuration.isCriticalAnalyzer()) { + this.getCriticalAnalyzer().start(); + } + + this.getCriticalAnalyzer().addAction((CriticalComponent c) -> { + ActiveMQServerLogger.LOGGER.irresponsiveComponent(c); + threadDump(); + + // on the case of a critical failure, -1 cannot simply means forever. + // in case graceful is -1, we will set it to 30 seconds + long timeout = configuration.getGracefulShutdownTimeout() < 0 ? 30000 : configuration.getGracefulShutdownTimeout(); + + Thread notificationSender = new Thread() { + public void run () { --- End diff -- should this need an Overrides?
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---