Begins a transaction. Sends made through the returned StompTransaction are staged
by the broker until commit(); abort() discards them.
The open transaction.
Sends DISCONNECT with a receipt, waits for it, and closes the socket.
Resolves once the socket is closed.
Sends a message to a destination.
The destination to send to (e.g. /queue/a).
The payload; strings are UTF-8 encoded.
Optionalopts: { contentType?: string; headers?: Record<string, string> }
Optional extra headers and a content-type.
Resolves once the SEND frame is written.
Sends a value as a JSON message to a destination.
Serializes value with JSON.stringify, sends it via send with a
content-type: application/json header (overriding any contentType in opts).
The destination to send to (e.g. /queue/a).
The value to serialize and send.
Optionalopts: { headers?: Record<string, string> }
Optional extra headers (a contentType here is ignored in favour of JSON).
Resolves once the SEND frame is written.
Subscribes to a destination.
The destination to subscribe to.
Optionalopts: {Optional ack mode (defaults to 'auto') and extra headers.
A subscription whose async iterator yields matching messages.
Unsubscribes by subscription id.
The subscription id to cancel.
Resolves once the UNSUBSCRIBE is written.
A live STOMP session over a single socket.
Obtain one from connect. A background pump reads the socket and routes frames, so sending, subscribing, and receiving can all be in flight at once. It is an
AsyncDisposable, soawait usingcloses it cleanly (sendingDISCONNECTwith a receipt first).Since
1.0.0