pub struct StompConfig {Show 14 fields
pub broker: SocketAddr,
pub host: String,
pub login: Option<String>,
pub passcode: Option<Secret>,
pub destination_prefix: String,
pub topics: Vec<String>,
pub unwrap_ma_payloads: bool,
pub reconnect: bool,
pub reconnect_delay: Duration,
pub connect_timeout: Duration,
pub suppress_echo: bool,
pub on_panic: OnPanic,
pub max_frame_size: usize,
pub tls: Option<ClientTls>,
}Expand description
Runtime settings for a STOMP client session.
This is not the host TOML section. broker is already a
SocketAddr; the host resolves the hostname before constructing
this. There is no enabled flag here — spawning is the host’s
decision.
Self::login and Self::passcode are None to omit those
CONNECT headers, not to send blanks. Self::passcode is sent only
when Self::login is set, and is a Secret so it cannot be
printed by a Debug of this struct.
Fields§
§broker: SocketAddr§host: StringSTOMP host header. ActiveMQ Classic typically wants /.
login: Option<String>CONNECT login. None omits the header.
passcode: Option<Secret>CONNECT passcode. Sent only when Self::login is Some.
destination_prefix: StringPrepended to each topic to form a STOMP destination. A missing
trailing slash is added by crate::DestinationMap.
topics: Vec<String>Engine topics (and STOMP dest suffixes) to bridge both ways.
unwrap_ma_payloads: boolPeel A-GRA Rx/Tx hex wrappers on inbound MESSAGE frames and publish wrapper plus inner as two envelopes.
reconnect: boolRetry the broker after a dropped session or a session Err.
reconnect_delay: DurationSleep between reconnect attempts.
connect_timeout: DurationBudget for TCP connect and for the CONNECTED wait, each.
suppress_echo: boolSkip outbound SEND when the envelope is an echo of this adapter.
on_panic: OnPanicPanic in a session task: abort run, or treat as a failed
session.
max_frame_size: usizeLargest frame accepted from the broker. Bounds the read buffer
and the content-length a peer can claim.
tls: Option<ClientTls>Wrap the broker connection in TLS. None dials plaintext, which
is the default.
Trait Implementations§
Source§impl Clone for StompConfig
impl Clone for StompConfig
Source§fn clone(&self) -> StompConfig
fn clone(&self) -> StompConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for StompConfig
impl Debug for StompConfig
Source§impl Default for StompConfig
impl Default for StompConfig
Source§fn default() -> Self
fn default() -> Self
Local ActiveMQ defaults: 127.0.0.1:61613, host /,
/topic/ + demo, unwrap and reconnect on, echo suppressed,
panic aborts, one-second reconnect delay, five-second
timeouts, DEFAULT_MAX_FRAME_SIZE.