256dpi / arduino-mqtt

MQTT library for Arduino
MIT License
1.01k stars 230 forks source link

How to enable aws MQTT persistent sessions on esp32 #287

Closed arslan437 closed 1 year ago

arslan437 commented 1 year ago

I have been working on a project in which I want to get data from the aws iot mqtt broker. Here is how things will work.

Esp32 is always in sleep mode. At start up it will connected to aws broker and subscribe to topic and then go to sleep After that From phone user will send a message to aws broker. Eps32 is in sleep mode so it won't get the message right away. Sender will set the qos to 1. so message will deliver to device at least one time. If device has persistent session. it will retain the message until its not delivered. Can anyone give me idea how can I make the connection persistent on esp32 arduino using this library.

256dpi commented 1 year ago

As noted in #294, this is out of scope for this project. We'll work in improving the QoS1 and QoS2 as discussed in #293.