TopicSamplerClient

The slice of an MQTT client a sample needs, so tests can drive the sampler without a broker.

Properties

Link copied to clipboard
abstract val connectionState: StateFlow<ConnectionState>
Link copied to clipboard
abstract val messages: Flow<Pair<String, ByteArray>>

Functions

Link copied to clipboard
abstract suspend fun close()
Link copied to clipboard
abstract suspend fun connect()
Link copied to clipboard
abstract suspend fun subscribe(filters: List<String>): List<String>

Returns the filters the broker granted; throws when it refused them all or closed the connection.

Link copied to clipboard
abstract suspend fun unsubscribe(filter: String)