Subscription

data class Subscription(val topicFilter: String, val maxQos: QoS = QoS.AT_MOST_ONCE, val noLocal: Boolean = false, val retainAsPublished: Boolean = false, val retainHandling: RetainHandling = RetainHandling.SEND_AT_SUBSCRIBE)

A single topic subscription with MQTT 5.0 subscription options per §3.8.3.1.

Constructors

Link copied to clipboard
constructor(topicFilter: String, maxQos: QoS = QoS.AT_MOST_ONCE, noLocal: Boolean = false, retainAsPublished: Boolean = false, retainHandling: RetainHandling = RetainHandling.SEND_AT_SUBSCRIBE)

Properties

Link copied to clipboard
val maxQos: QoS

Maximum QoS level for messages on this subscription.

Link copied to clipboard

If true, the server will not forward messages published by this client.

Link copied to clipboard

If true, retain flag from original publish is preserved.

Link copied to clipboard

Controls when retained messages are sent.

Link copied to clipboard

The topic filter to subscribe to (e.g. "sensors/#").