private Mono<Void> destroy() {
        return stopPlugins().materialize()
                .flatMap(signal -> {
                    Throwable stopPluginsException = signal.getThrowable();
                    Exception closeEngineException = null;
                    if (engine != null) {
                        try {
                            ((Engine) engine).close(true);
                        } catch (Exception e) {
                            closeEngineException = e;
                        }
                    }
                    if (stopPluginsException != null || closeEngineException != null) {
                        Exception e = new RuntimeException("Caught errors while destroying");
                        if (stopPluginsException != null) {
                            e.addSuppressed(stopPluginsException);
                        }
                        if (closeEngineException != null) {
                            e.addSuppressed(closeEngineException);
                        }
                        return Mono.error(e);
                    }
                    return Mono.empty();
                });
    }
@implNote Start plugins after all beans are ready so that plugins can get any bean when
          starting.
turms-server-common/src/main/java/im/turms/server/common/infra/plugin/PluginManager.java