pub fn live_labjack_stream_subject(
nats_subject: &str,
asset: u32,
site_id: Option<&str>,
box_id: Option<&str>,
labjack_name: Option<&str>,
source_type: Option<&str>,
source_id: Option<&str>,
) -> StringExpand description
Builds the JetStream subject wildcard for all live channels from one source.
Legacy configs get <root>.*.data.*, which matches every asset under the root.
Structured configs get <root>.<site>.<box>.<source>.live.*, with the same tokens
and fallbacks as live_labjack_channel_subject, so the wildcard always matches
the channel subjects built from the same config.
§Arguments
nats_subject- Subject root, for exampleavenaboxoravenars.asset- Asset number, the last-resort source token in the structured layout. Not used in the legacy layout, whose wildcard covers every asset.site_id- Site ID for the structured layout.box_id- Box ID for the structured layout.labjack_name- LabJack name, used as the source whensource_idisNone.source_type- Accepted for config compatibility; not used in the subject.source_id- Source ID for the structured layout.
§Examples
("avenabox", 1456, None, None, None, None, None)
-> "avenabox.*.data.*"
("avenars", 1456, Some("i69"), Some("i69-mu1"), Some("i69-lj2"), None, None)
-> "avenars.i69.i69-mu1.i69-lj2.live.*"
("avenars", 42, None, None, None, None, None)
-> "avenars.unknown-site.unknown-box.asset042.live.*"