Skip to content

Commit

Permalink
Validating configs before initializing the hub
Browse files Browse the repository at this point in the history
Signed-off-by: HimajaDhanyamraju2 <[email protected]>
  • Loading branch information
HimajaDhanyamraju2 committed Feb 6, 2024
1 parent 8392b91 commit 4032cde
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions hub/start_hub.bal
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,16 @@ public function main() returns error? {
log:printInfo("found all metadata topics in kafka");
}
}
// Initialize the Hub
_ = @strand {thread: "any"} start syncRegsisteredTopicsCache();
_ = @strand {thread: "any"} start syncSubscribersCache();

boolean|error validConfigs = validateConfigs();
if validConfigs is error {
return validConfigs;
}

// Initialize the Hub
_ = @strand {thread: "any"} start syncRegsisteredTopicsCache();
_ = @strand {thread: "any"} start syncSubscribersCache();

// Start the Hub
http:Listener httpListener = check new (config:HUB_PORT);
check httpListener.attach(healthCheckService, "hub/actuator/health");
Expand Down

0 comments on commit 4032cde

Please sign in to comment.