subscribeBinary

suspend fun StompSession.subscribeBinary(destination: String): Flow<ByteString>(source)

Subscribes and returns a Flow of binary message bodies that unsubscribes automatically when the collector is done or cancelled. The returned flow can be collected only once.

Frames without a body are indistinguishable from frames with a 0-length body, and therefore result in an empty ByteArray in the subscription flow.

See the general StompSession documentation for more details about subscription flows, suspension and receipts.