toTopic method

MqttSubscribeMessage toTopic(
  1. String topic
)

Adds a new subscription topic with the AtMostOnce Qos Level. If you want to change the Qos level follow this call with a call to AtTopic(MqttQos).

Implementation

MqttSubscribeMessage toTopic(String topic) {
  _lastTopic = topic;
  payload.addSubscription(topic, MqttQos.atMostOnce);
  return this;
}