Listen for responses of supervisors
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
This commit is contained in:
@@ -99,7 +99,7 @@ async fn main() {
|
||||
// Shared application state
|
||||
let state = Arc::new(herocoordinator::rpc::AppState::new(service));
|
||||
|
||||
// Start router workers (auto-discovered contexts)
|
||||
// Start router workers (auto-discovered contexts) and a single global inbound listener
|
||||
{
|
||||
let base_url = format!("http://{}:{}", cli.mycelium_ip, cli.mycelium_port);
|
||||
let cfg = herocoordinator::router::RouterConfig {
|
||||
@@ -110,6 +110,10 @@ async fn main() {
|
||||
transport_poll_interval_secs: 2,
|
||||
transport_poll_timeout_secs: 300,
|
||||
};
|
||||
// Global inbound listener for supervisor replies via Mycelium popMessage
|
||||
let _inbound_handle =
|
||||
herocoordinator::router::start_inbound_listener(service_for_router.clone(), cfg.clone());
|
||||
// Per-context outbound delivery loops
|
||||
let _auto_handle = herocoordinator::router::start_router_auto(service_for_router, cfg);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user