subscribeAndConsumeBlocking

fun subscribeAndConsumeBlocking(messageConsumer: (ClientMessageWrapper) -> Unit)

Subscribes to incoming messages and consumes them on the thread that called this function. This will open a dedicated, persistent socket connection for this function call. The current thread will be blocked when it waits for more messages. After this function executes, an unsubscribe request will be made and the persistent socket will be closed.

Throws