pub(crate) struct StompSection {Show 20 fields
pub(crate) enabled: bool,
pub(crate) id: String,
pub(crate) broker: String,
pub(crate) host: String,
pub(crate) login: String,
pub(crate) passcode: Secret,
pub(crate) destination_prefix: String,
pub(crate) topics: Vec<String>,
pub(crate) unwrap_ma_payloads: bool,
pub(crate) reconnect: bool,
pub(crate) reconnect_delay_secs: u64,
pub(crate) connect_timeout_secs: u64,
pub(crate) suppress_echo: bool,
pub(crate) on_panic: String,
pub(crate) max_frame_size: usize,
pub(crate) tls: bool,
pub(crate) tls_ca: String,
pub(crate) tls_server_name: String,
pub(crate) tls_client_cert: String,
pub(crate) tls_client_key: String,
}Expand description
STOMP adapter settings.
broker stays a string so a hostname can be resolved at startup.
Empty login and passcode mean omit those CONNECT headers, not send
blanks.
Fields§
§enabled: boolWhether to spawn the adapter. true when the section is present.
id: StringEngine adapter id. Defaults to "stomp".
broker: StringBroker address, host:port. Defaults to 127.0.0.1:61613.
host: StringSTOMP host header. ActiveMQ Classic typically wants "/".
login: StringCONNECT login. Empty (the default) omits the header.
passcode: SecretCONNECT passcode. Empty (the default) omits the header. Held as a
Secret so a Debug of the parsed config cannot print it.
destination_prefix: StringPrefix prepended to each topic to form a STOMP destination.
Defaults to "/topic/".
topics: Vec<String>Engine topic names, and the suffixes of the STOMP destinations
bridged both ways. Defaults to ["demo"].
unwrap_ma_payloads: boolPeel A-GRA Rx/Tx hex wrappers on inbound frames and fan out
wrapper plus inner. Defaults to true.
reconnect: boolRetry the broker after a dropped session. Defaults to true.
reconnect_delay_secs: u64Seconds to wait between reconnect attempts. Defaults to 1.
connect_timeout_secs: u64Seconds for TCP connect and for the CONNECTED wait, each.
Defaults to 5.
suppress_echo: boolSkip outbound SEND when the envelope came from this adapter.
Defaults to true.
on_panic: Stringabort or reconnect when a session task panics. Defaults to
"abort".
max_frame_size: usizeLargest frame accepted from the broker, in bytes. Defaults to the adapter crate’s limit.
tls: boolWrap the broker connection in TLS. Defaults to false. ActiveMQ
Classic’s SSL transport connector conventionally listens on
61612, not 61613.
tls_ca: StringPEM bundle of certificate authorities the broker’s certificate must chain to. Empty (the default) uses the operating system trust store.
tls_server_name: StringName checked against the broker’s certificate. Empty (the
default) uses the host part of broker.
tls_client_cert: StringPEM certificate chain presented to the broker, leaf certificate
first. Empty (the default) presents nothing. Requires
tls_client_key and tls = true.
tls_client_key: StringPEM private key for tls_client_cert, in PKCS#8, PKCS#1, or SEC1
form. Empty (the default) presents nothing. Requires
tls_client_cert.
Implementations§
Source§impl StompSection
impl StompSection
Sourcepub(crate) fn on_panic_mode(&self) -> Result<OnPanic, String>
pub(crate) fn on_panic_mode(&self) -> Result<OnPanic, String>
Parses Self::on_panic into [oa_gateway_stomp::OnPanic].
§Errors
Returns an error if the string is not abort or reconnect.