run

suspend fun run(config: ModuleConfig.MQTTConfig?, regionTopic: String)(source)

Runs one sample to completion. Cancelling the caller ends it early and keeps what was heard, as does the broker closing the connection once something has arrived. Any other error fails it with Failure.ERROR.