Add support for core PubSub config via json

This commit is contained in:
John Colvin committed 2024-06-06 09:15:16 -05:00
1 parent 6049826e90
commit c99d5fe24c
7 files changed
+177 -50

No files matched your search

+2 -2
View File
@@ -25,7 +25,7 @@ int Run(PubSubServerConfig cfg) {
PubSubConfig.SetGlobalConfig(Log.notnull(cfg.PubSub));
Configuration.initialize();
return cfg.SimpleEchoServer ?? false ?
RunEchoServer(cfg.PubSub.Port.assert_value()) :
RunEchoServer(cfg.PubSub.ServerPort.assert_value()) :
RunPubSubServer();
} catch (Exception ex) {
// Write the error to console first, in case the logging system is compromised.
@@ -54,7 +54,7 @@ int RunPubSubServer() {
Thread.Sleep(gced ? config.WaitPeriodAfterGc.assert_value() : defaultWaitTime);
}
});
new PubSubMessageReactor(config.Port.assert_value()).start();
new PubSubMessageReactor(config.ServerPort.assert_value()).start();
return 0;
}