DongyuanPan commented on code in PR #276: URL: https://github.com/apache/rocketmq-mqtt/pull/276#discussion_r1598039603
########## mqtt-ds/src/main/java/org/apache/rocketmq/mqtt/ds/meta/MetaPersistManagerSample.java: ########## @@ -64,15 +63,14 @@ public class MetaPersistManagerSample implements MetaPersistManager { public void init() throws MQClientException, RemotingException, InterruptedException, MQBrokerException { defaultMQAdminExt = MqFactory.buildDefaultMQAdminExt("MetaLoad", serviceConf.getProperties()); defaultMQAdminExt.start(); - refreshMeta(); scheduler = new ScheduledThreadPoolExecutor(1, new ThreadFactoryImpl("refreshMeta")); scheduler.scheduleWithFixedDelay(() -> { try { refreshMeta(); } catch (Throwable t) { logger.error("", t); } - }, 5, 5, TimeUnit.SECONDS); + }, 0, 5, TimeUnit.SECONDS); Review Comment: Delaying through time will result in slower startup times, which is not conducive to future serverless resilience capabilities. It may be possible to solve the startup order problem through bean dependencies. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@rocketmq.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org