| 69 | } |
| 70 | |
| 71 | public void start() throws Exception { |
| 72 | ShutdownHook.add(this, this::stop); |
| 73 | logger.info("start MQManager from '{}'", home); |
| 74 | loadMQ(); |
| 75 | masterAgent.startAndWaitConnectionReady(); |
| 76 | var acceptorAddress = masterService.getAcceptorAddress(); |
| 77 | masterAgent.register(acceptorAddress.getKey(), acceptorAddress.getValue(), queueCount()); |
| 78 | proxyServer.start(); |
| 79 | |
| 80 | loadMonitorTimer = Task.scheduleUnsafe(120_000, 120_000, this::loadMonitor); |
| 81 | } |
| 82 | |
| 83 | public void stop() throws Exception { |
| 84 | if (null != loadMonitorTimer) |