oa_gateway::adapters::stomp

Function start

Source
pub(crate) fn start(
    section: &StompSection,
    broker: SocketAddr,
    tls: Option<ClientTls>,
    engine: Arc<Engine>,
    shutdown: CancellationToken,
) -> Result<JoinHandle<()>, String>
Expand description

Spawns StompAdapter toward broker and returns a handle to its run task.

Timeouts, echo skip, and panic policy come from section. A failure from run is logged and the task still finishes, so one adapter cannot take the host down.

ยงErrors

Returns an error if on_panic is not abort or reconnect.