subscribeWithSubscriptionList method
Initiates a topic subscription request to the connected broker with a strongly typed data processor callback. The list of subscriptions to subscribe to. Note that user properties are set on a per message basis not a per subscription basis, if you wish to send user properties then set them on the first subscription in the list. Returns the subscriptions or null on failure
Implementation
List<MqttSubscription>? subscribeWithSubscriptionList(
List<MqttSubscription> subscriptions) {
if (connectionStatus!.state != MqttConnectionState.connected) {
throw MqttConnectionException(connectionHandler?.connectionStatus?.state);
}
return subscriptionsManager!.subscribeSubscriptionList(subscriptions);
}