novastone-media / MQTT-Client-Framework

iOS, macOS, tvOS native ObjectiveC MQTT Client Framework
Other
1.84k stars 465 forks source link

can we get the List of persisted messages when the broker is disconnected? #468

Open Mahaswami opened 6 years ago

Mahaswami commented 6 years ago

Once the broker disconnects due to some internet connection problem or some other problem, can we get the list of messages that is sent to broker from client when broker is in offline?

MqttClient version 0.13.1. connection constructor

[self.session connectTo:host
                          port:port
                          tls:NO
                          keepalive:60
                          clean:NO
                          auth:true
                          user:username
                          pass:password
                          will:NO
                         willTopic:nil
                         willMsg:nil
                         willQos:qos
                        willRetainFlag:NO
                        withClientId:uuid
                        securityPolicy:nil
                        certificates:nil
                        protocolLevel:MQTTProtocolVersion311
                        connectHandler:^(NSError *error) {
                        if(error){
                            mqttConnectionCallback(@[[NSNull null], @false]);
                       } else {
                           mqttConnectionCallback(@[[NSNull null], @true]);
                       }
               }];