Expand description
STOMP 1.2 client adapter for ActiveMQ Classic (and any STOMP broker).
This is a client, not a server, and it is not JMS. Java CAL peers
still speak OpenWire; ActiveMQ routes the same topic between
OpenWire and STOMP when destinations match. The engine sees only
oa_gateway_core::Envelope values. This crate maps
/topic/{name} onto oa_gateway_core::RouteKey::topic and stamps
oag.* headers so a MESSAGE is not SENDed back to the broker that
just delivered it.
StompAdapter::serve (and oa_gateway_adapter::Adapter::run)
connect, subscribe the configured topics both ways, and retry while
StompConfig::reconnect is set. A panic in a session is isolated
on a child task; StompConfig::on_panic chooses abort or
reconnect. The host does not restart a finished run.
The codec (Frame, decode_one) is public so tests can speak
STOMP without this adapter.
Modulesยง
- adapter ๐ActiveMQ STOMP client adapter. Protocol control stays here; data crosses the engine.
- client ๐TCP STOMP session: handshake, framed read/write.
- codec ๐STOMP 1.2 frames. Text commands and headers; opaque body bytes.
- config ๐
- dest ๐STOMP destination โ engine
RouteKeymapping. - secret ๐A string that must not reach a log.
Structsยง
/topic/prefix used by ActiveMQ STOMP for JMS topics.- One STOMP frame (command + headers + body).
- Wraps a credential โ the STOMP
passcodeโ so a strayDebugorDisplayon a config struct cannot print it. - STOMP client that bridges configured topics both ways.
- Runtime settings for a STOMP client session.
Enumsยง
- Why a frame could not be decoded, or why a write failed.
- What an adapter does when its session task panics.
Constantsยง
- Largest single frame (header block plus body) accepted from a peer.
- Envelope
crate::MessageId, written on outbound frames. - Which adapter last published this envelope onto the engine.
- STOMP
destinationas received. Stamped inbound; stripped on outbound becausestomp.*headers are not copied. - Engine topic, copied onto a native frame when the protocol has a place for it.
- Engine type hint, copied onto a native frame when present.
Functionsยง
- Pulls one complete frame from
buf, rejecting frames larger thanDEFAULT_MAX_FRAME_SIZE. - Pulls one complete frame from
buf. - Engine route for an inbound STOMP MESSAGE.
- MIME type from a STOMP
content-typeheader, or a sniff of the body. - Best-effort type hint from a JSON or XML body.