nautechsystems/nautilus_trader · error
external message bus factory cannot be combined with injecte
Error message
external message bus factory cannot be combined with injected egress or ingress
What it means
The builder rejects configurations where an external message bus factory is supplied together with an injected external egress or ingress. An external message bus factory manages its own egress/ingress wiring, so injecting them separately would be contradictory.
Source
Thrown at crates/live/src/node/builder.rs:576
log::info!(
"Building LiveNode with {} data clients and {} execution clients",
self.data_client_factories.len(),
self.exec_client_factories.len()
);
self.config.validate_runtime_support()?;
if self.config.event_store.is_some() && self.event_store_factory.is_none() {
anyhow::bail!(
"LiveNodeConfig.event_store is set but no factory was registered; \
call LiveNodeBuilder::with_event_store(...) to install one"
);
}
if self.external_msgbus_factory.is_some()
&& (self.external_msgbus_egress.is_some() || self.external_msgbus_ingress.is_some())
{
anyhow::bail!(
"external message bus factory cannot be combined with injected egress or ingress"
);
}
let runner = AsyncRunner::new();
runner.bind_senders();
let socket_registry = SocketReconnectRegistry::default();
let kernel = NautilusKernel::new_with_dependencies(
self.name.clone(),
self.config.clone(),
NautilusKernelDependencies::default()
.with_clock_factory(self.clock_factory.take())
.with_event_store_factory(self.event_store_factory.take()),
)?;
#[cfg(feature = "python")]
if let Some(controller) = self.config.controller.as_ref() {View on GitHub (pinned to 18893faf8b)
Solutions
- Remove the external_msgbus_egress/ingress injections and let the external message bus factory supply them.
- Or remove the external message bus factory registration if you want to inject egress/ingress directly.
- Split into two node configurations if both mechanisms are genuinely needed.
Example fix
// before
builder.with_external_msgbus_factory(factory)
.with_external_msgbus_egress(egress);
// after
builder.with_external_msgbus_factory(factory); // factory owns egress/ingress Defensive patterns
Strategy: validation
Validate before calling
assert!(!(external_msgbus_factory_set && (egress_set || ingress_set)), "external msgbus factory is mutually exclusive with injected egress/ingress");
Prevention
- Choose one message bus integration strategy per node and document it.
- Centralize node construction so conflicting options cannot be set independently.
- Review builder call chains for leftover wiring from previous approaches.
When it happens
Trigger: Calling LiveNodeBuilder with both with_external_msgbus_factory (factory registered) and either with_external_msgbus_egress or with_external_msgbus_ingress, then calling build().
Common situations: Merging two integration approaches in one node — e.g. embedding the node into an app with its own message bus bridge while also pointing it at an external bus factory; incremental migration code that left both paths active.
Related errors
- Binance v2 does not support instrument filter_callable {filt
- default_leverage requires spot_account_type=Margin
- Kraken Spot does not support the demo environment
- LiveNodeConfig.event_store is set but no factory was registe
- LiveNode cannot be used with Backtest environment
AI-assisted analysis of nautechsystems/nautilus_trader@18893faf8b (2026-09-08).
Data as JSON: /api/errors/fe129934bd397407.
Report an issue: GitHub.