Closed jerry20011024 closed 7 months ago
I found Solution
mqtt5.subscribe("xxx/power", qos: CocoaMQTTQoS.qos1)
to
let power = MqttSubscription(topic: "xxx/power", qos: CocoaMQTTQoS.qos1)
power.retainHandling = .sendOnSubscribe
power.retainAsPublished = true
power.noLocal = false
mqtt5.subscribe([power])
1.When i send retain message to a topic ,i get this message retained == false in didReceiveMessage 2.I have a retained message, but when I subscribe to a topic, the didReceiveMessage method is not being called. How can I correct this issue?
Issues mentioned above are not present when using the GUI. Everything works as expected.