subscribeSubscriptionTopic method
Registers a new subscription with the subscription manager from a topic and a maximum Qos. Returns the subscription subscribed to.
Implementation
MqttSubscription? subscribeSubscriptionTopic(String? topic, MqttQos? qos) {
if (topic == null) {
throw ArgumentError(
'MqttSubscriptionManager::subscribeSubscriptionTopic - topic is null');
}
var cn = _tryGetExistingSubscription(topic);
return cn ??= _createNewSubscription(topic, qos);
}