oa_gateway::config::stomp

Struct StompSection

Source
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: bool

Whether to spawn the adapter. true when the section is present.

§id: String

Engine adapter id. Defaults to "stomp".

§broker: String

Broker address, host:port. Defaults to 127.0.0.1:61613.

§host: String

STOMP host header. ActiveMQ Classic typically wants "/".

§login: String

CONNECT login. Empty (the default) omits the header.

§passcode: Secret

CONNECT passcode. Empty (the default) omits the header. Held as a Secret so a Debug of the parsed config cannot print it.

§destination_prefix: String

Prefix 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: bool

Peel A-GRA Rx/Tx hex wrappers on inbound frames and fan out wrapper plus inner. Defaults to true.

§reconnect: bool

Retry the broker after a dropped session. Defaults to true.

§reconnect_delay_secs: u64

Seconds to wait between reconnect attempts. Defaults to 1.

§connect_timeout_secs: u64

Seconds for TCP connect and for the CONNECTED wait, each. Defaults to 5.

§suppress_echo: bool

Skip outbound SEND when the envelope came from this adapter. Defaults to true.

§on_panic: String

abort or reconnect when a session task panics. Defaults to "abort".

§max_frame_size: usize

Largest frame accepted from the broker, in bytes. Defaults to the adapter crate’s limit.

§tls: bool

Wrap the broker connection in TLS. Defaults to false. ActiveMQ Classic’s SSL transport connector conventionally listens on 61612, not 61613.

§tls_ca: String

PEM bundle of certificate authorities the broker’s certificate must chain to. Empty (the default) uses the operating system trust store.

§tls_server_name: String

Name checked against the broker’s certificate. Empty (the default) uses the host part of broker.

§tls_client_cert: String

PEM certificate chain presented to the broker, leaf certificate first. Empty (the default) presents nothing. Requires tls_client_key and tls = true.

§tls_client_key: String

PEM 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

Source

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.

Trait Implementations§

Source§

impl Debug for StompSection

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for StompSection

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for StompSection

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,