oa_gateway_testing::stomp

Function start_stomp_adapter

Source
pub async fn start_stomp_adapter(
    engine: Arc<Engine>,
    id: impl Into<String>,
    broker: SocketAddr,
    topics: Vec<String>,
    settle: Duration,
) -> CancellationToken
Expand description

Starts StompAdapter toward broker and waits until it is subscribed.

Reconnect is off so a dropped session fails the test. A-GRA unwrap is on. settle is an extra sleep after serve_ready — live ActiveMQ needs a few hundred milliseconds for SUBSCRIBE to land; the mini broker can use Duration::ZERO.

Panics if the adapter is not ready within five seconds.