subscribeOptional
Subscribes and returns a Flow of messages of type T that unsubscribes automatically when the collector is done or cancelled. The returned flow can be collected only once.
The received MESSAGE frames are converted to instances of T using the provided Kotlinx Serialization's deserializer. Message frames without a body are allowed and result in null values in the flow.
See the general StompSession documentation for more details about subscription flows and receipts.
Subscribes and returns a Flow of messages of type T that unsubscribes automatically when the collector is done or cancelled. The returned flow can be collected only once.
The received MESSAGE frames are converted to instances of T using a deserializer inferred from the class of T. This has limited support in JavaScript and may break on generic types. Message frames without a body are allowed and result in null values in the flow.
See the general StompSession documentation for more details about subscription flows and receipts.