nautechsystems/nautilus_trader · error
DBN message type is not currently supported
Error message
DBN message type is not currently supported
What it means
get_nautilus_instrument_id_for_record only handles a fixed set of DBN message types (e.g. TradeMsg, Mbp1Msg, CbboMsg, TbboMsg etc.). If the record is a DBN schema the adapter does not match, it fails with this error instead of extracting the instrument id.
Source
Thrown at crates/adapters/databento/src/symbology.rs:139
(msg.hd.instrument_id, msg.ts_recv)
} else if let Some(msg) = record.get::<dbn::OhlcvMsg>() {
(msg.hd.instrument_id, msg.hd.ts_event)
} else if let Some(msg) = record.get::<dbn::StatusMsg>() {
(msg.hd.instrument_id, msg.ts_recv)
} else if let Some(msg) = record.get::<dbn::ImbalanceMsg>() {
(msg.hd.instrument_id, msg.ts_recv)
} else if let Some(msg) = record.get::<dbn::StatMsg>() {
(msg.hd.instrument_id, msg.ts_recv)
} else if let Some(msg) = record.get::<dbn::InstrumentDefMsg>() {
(msg.hd.instrument_id, msg.ts_recv)
} else if let Some(msg) = record.get::<dbn::Cmbp1Msg>() {
(msg.hd.instrument_id, msg.ts_recv)
} else if let Some(msg) = record.get::<dbn::CbboMsg>() {
(msg.hd.instrument_id, msg.ts_recv)
} else if let Some(msg) = record.get::<dbn::TbboMsg>() {
(msg.hd.instrument_id, msg.ts_recv)
} else {
anyhow::bail!("DBN message type is not currently supported")
};
let duration = time::Duration::nanoseconds(nanoseconds as i64);
let datetime = time::OffsetDateTime::UNIX_EPOCH
.checked_add(duration)
.ok_or_else(|| anyhow::anyhow!("Timestamp overflow for record"))?;
let date = datetime.date();
let symbol_map = metadata.symbol_map_for_date(date)?;
let raw_symbol = symbol_map
.get(instrument_id)
.ok_or_else(|| anyhow::anyhow!("No raw symbol found for {instrument_id}"))?;
let symbol = Symbol::from_str_unchecked(raw_symbol);
Ok(InstrumentId::new(symbol, venue))
}
#[must_use]View on GitHub (pinned to 18893faf8b)
Solutions
- Only subscribe to schemas supported by the adapter, or filter records before decoding
- Update the match chain to handle the new DBN message type
- Check the Databento schema list against the adapter's supported types
Example fix
// before
} else {
anyhow::bail!("DBN message type is not currently supported")
};
// after
} else if let Some(msg) = record.get::<dbn::StatMsg>() {
(msg.hd.instrument_id, msg.ts_recv)
} else {
log::debug!("Unsupported DBN message type, skipping");
return Ok(None);
}; Defensive patterns
Strategy: type-guard
Validate before calling
// only request schemas the adapter supports const SUPPORTED: &[dbn::Schema] = &[dbn::Schema::Trades, dbn::Schema::Mbp1, ...]; assert!(SUPPORTED.contains(&schema));
Type guard
fn is_supported_record(r: &dbn::RecordRef) -> bool {
r.get::<dbn::TradeMsg>().is_some()
|| r.get::<dbn::Mbp1Msg>().is_some()
|| r.get::<dbn::CbboMsg>().is_some()
|| r.get::<dbn::TbboMsg>().is_some()
} Try / catch
match decode_nautilus_instrument_id(record) {
Ok(id) => ...,
Err(e) if e.to_string().contains("not currently supported") => {
log::debug!("skipping unsupported record");
}
Err(e) => return Err(e),
} Prevention
- Subscribe only to adapter-supported Databento schemas
- Filter or route unsupported records before decoding
- Track Databento schema additions vs adapter support
When it happens
Trigger: Decoding a Databento subscription whose schema (e.g. definition, statistics, imbalance) is not in the supported match chain of record.get::<T>() calls.
Common situations: Subscribing to new/uncommon Databento schemas without updating adapter support; passing raw records from a multi-schema subscription through instrument-id decoding.
Related errors
- Invalid `{SCHEMA_PARAM}` '{schema}'. Must be one of: {allowe
- DBN message type is not currently supported
- Invalid schema. Must be one of: mbp-1, tbbo, bbo-1s, bbo-1m,
- Invalid schema {dbn_schema}
- Invalid schema. Must be one of: trades, tbbo, tcbbo, mbp-1,
AI-assisted analysis of nautechsystems/nautilus_trader@18893faf8b (2026-09-08).
Data as JSON: /api/errors/2ea34eb21dce0168.
Report an issue: GitHub.