nautechsystems/nautilus_trader · error

DBN message type is not currently supported

Error message

DBN message type is not currently supported

What it means

`decode_record` dispatches a DBN record by concrete type (MboMsg, TradeMsg, Mbp1Msg, ..., CbboMsg). If the record is none of the supported types, the decoder cannot process it and bails with this catch-all message.

Source

Thrown at crates/adapters/databento/src/decode/market_data.rs:867

                instrument_id,
                price_precision,
                Some(ts_init),
                include_trades,
            )?;
            (maybe_quote.map(Data::Quote), maybe_trade.map(Data::Trade))
        }
    } else if let Some(msg) = record.get::<dbn::TbboMsg>() {
        // TBBO always has a trade, quote may be skipped if prices undefined
        let ts_init = determine_timestamp(ts_init, msg.ts_recv.into());
        let (maybe_quote, trade) =
            decode_tbbo_msg(msg, instrument_id, price_precision, Some(ts_init))?;
        (maybe_quote.map(Data::Quote), Some(Data::Trade(trade)))
    } else if let Some(msg) = record.get::<dbn::CbboMsg>() {
        let ts_init = determine_timestamp(ts_init, msg.ts_recv.into());
        let maybe_quote = decode_cbbo_msg(msg, instrument_id, price_precision, Some(ts_init))?;
        (maybe_quote.map(Data::Quote), None)
    } else {
        anyhow::bail!("DBN message type is not currently supported")
    };

    Ok(result)
}

const fn determine_timestamp(ts_init: Option<UnixNanos>, msg_timestamp: UnixNanos) -> UnixNanos {
    match ts_init {
        Some(ts_init) => ts_init,
        None => msg_timestamp,
    }
}

View on GitHub (pinned to 18893faf8b)

Solutions

  1. Only subscribe to/request schemas supported by the adapter (mbo, trades, mbp variants, cbbo)
  2. Upgrade the adapter crate to one that decodes the record type you need
  3. Log the record's rtype/encoding to identify the unsupported type and request support
  4. Filter unsupported record types out of the stream before decoding

Example fix

// before
subscribe(schema="imbalance") // record type has no decode branch
// after
subscribe(schema="mbp-1") // supported record type
Defensive patterns

Strategy: try-catch

Validate before calling

const SUPPORTED_SCHEMAS: &[&str] = &["mbo", "trades", "mbp-1", "mbp-10", "tbbo", "cbbo"]; // supported record types
fn is_supported_schema(schema: &str) -> bool { SUPPORTED_SCHEMAS.contains(&schema) }

Try / catch

match decode_record(record) {
    Ok(data) => Some(data),
    Err(e) if e.to_string().contains("DBN message type is not currently supported") => {
        log::debug!("skipping unsupported DBN record type");
        None
    }
    Err(e) => return Err(e.into()),
}

Prevention

When it happens

Trigger: Decoding a DBN record of a type the adapter does not support yet (e.g. newer Databento record types like `ImbalanceMsg` or definition/status types routed here), via `get_range_quotes`/`get_range_trades` or historical live streams.

Common situations: Subscribing to schemas whose records have no decode branch; version skew where a newer dbn crate emits record types the adapter decoder doesn't know; accidentally decoding definition records through the market-data path.

Understand the failure class

Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.

Related errors


AI-assisted analysis of nautechsystems/nautilus_trader@18893faf8b (2026-09-08). Data as JSON: /api/errors/7706dd10a7bdcf57. Report an issue: GitHub.