aws/aws-iot-device-sdk-cpp

Disconnection and Reconnection handling in C++ SDK

anirudhan-sacrasys opened this issue · 1 comments

Hi,

I have two questions

  1. How do we turn off the keep alive operation?
    When i set the keep alive interval as 0 or 1 seconds in the SampleConfig.json file, the program immediately enters into disconnect mode even when the network connection is available. Since a minimum of 2 seconds need to be given to the keep alive interval for proper operation, when the connection gets disconnected the disconnect callback does not kick in immediately, but gets triggered only after 1.5X the keep alive interval. This causes loss of data which is generated by the IoT device, in between the time that the disconnection happens and the time the disconnectcallback is called.

  2. Where is the publish data queued when disconnection happens?
    When i set the keep alive interval as 30 seconds, during disconnection the data generated by the IoT device gets queued up for upto 30 seconds. If any reconnection happens within that time period the queued up data is pushed to the cloud. But i am not able to identify the container that queues up the data in the local when disconnection happens.

Please let me know your thoughts on what needs to be done to establish a smooth transition when disconnection happens, without any loss of data.

Greetings! Sorry to say but this is a very old issue that is probably not getting as much attention as it deservers. We encourage you to check if this is still an issue in the latest release and if you find that this is still a problem, please feel free to open a new one.