{"record":{"id":"dacf2575457de71d","repo":"nautechsystems/nautilus_trader","slug":"livenodeconfig-event-store-is-set-but-no-factory-w","errorCode":null,"errorMessage":"LiveNodeConfig.event_store is set but no factory was registered; call LiveNodeBuilder::with_event_store(...) to install one","messagePattern":"LiveNodeConfig\\.event_store is set but no factory was registered; call LiveNodeBuilder::with_event_store\\(\\.\\.\\.\\) to install one","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/live/src/node/builder.rs","lineNumber":567,"sourceCode":"    /// This will:\n    /// 1. Build the underlying kernel.\n    /// 2. Create clients using factories.\n    /// 3. Register clients with engines.\n    ///\n    /// # Errors\n    ///\n    /// Returns an error if node construction fails.\n    pub fn build(mut self) -> anyhow::Result<LiveNode> {\n        log::info!(\n            \"Building LiveNode with {} data clients and {} execution clients\",\n            self.data_client_factories.len(),\n            self.exec_client_factories.len()\n        );\n\n        self.config.validate_runtime_support()?;\n\n        if self.config.event_store.is_some() && self.event_store_factory.is_none() {\n            anyhow::bail!(\n                \"LiveNodeConfig.event_store is set but no factory was registered; \\\n                 call LiveNodeBuilder::with_event_store(...) to install one\"\n            );\n        }\n\n        if self.external_msgbus_factory.is_some()\n            && (self.external_msgbus_egress.is_some() || self.external_msgbus_ingress.is_some())\n        {\n            anyhow::bail!(\n                \"external message bus factory cannot be combined with injected egress or ingress\"\n            );\n        }\n\n        let runner = AsyncRunner::new();\n        runner.bind_senders();\n\n        let socket_registry = SocketReconnectRegistry::default();\n","sourceCodeStart":549,"sourceCodeEnd":585,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/live/src/node/builder.rs#L549-L585","documentation":"During LiveNodeBuilder::build, the config declares an event_store but no event store factory was installed on the builder via with_event_store, so the node cannot construct its event store. The builder fails fast instead of silently dropping events.","triggerScenarios":"Setting LiveNodeConfig.event_store = Some(...) (e.g. via a config file or Config construction) while building with a LiveNodeBuilder that never had with_event_store(...) called.","commonSituations":"Loading a LiveNodeConfig from TOML/JSON that enables an event store, then passing it to the builder without registering the factory; refactoring code from LiveNode::build to the builder path (or vice versa) and dropping the factory wiring.","solutions":["Call LiveNodeBuilder::with_event_store(...) with a factory before calling build().","Remove the event_store entry from LiveNodeConfig if no persistence is desired.","Ensure the config-loading path does not inject event_store settings unintentionally."],"exampleFix":"// before\nlet node = LiveNodeBuilder::new(config)?; // config.event_store = Some(...)\n    .build()?;\n// after\nlet node = LiveNodeBuilder::new(config)?\n    .with_event_store(Box::new(MyEventStoreFactory::new(store_config)))\n    .build()?;","handlingStrategy":"validation","validationCode":"assert!(config.event_store.is_none() || event_store_factory_installed, \"event_store set without factory\");","typeGuard":null,"tryCatchPattern":"match result { Err(e) if e.to_string().contains(\"with_event_store\") => { /* wire factory and rebuild */ }, Err(e) => return Err(e), Ok(node) => Ok(node) }","preventionTips":["Pair config fields that need factories with builder wiring in one setup function.","Add an integration test that builds the node from the same config source used in production.","Prefer the LiveNodeBuilder API whenever persistence is involved."],"tags":["rust","config-validation","event-store","live-node"],"backgroundTag":"missing-dependency","analyzedSha":"18893faf8b356be3320add8de2f861b0b647cf06","analyzedAt":"2026-09-08T20:49:34.690Z","contentChangedAt":"2026-09-08T20:49:34.690Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}