MQTT Slowdown After Wi-Fi Outage #2588
Unanswered
ngiustini-invn
asked this question in
Q&A
Replies: 1 comment 3 replies
-
Are you seeing this slowdown with this sdk (aws-sdk-cpp) or with the IoT sdk (aws-iot-device-sdk-cpp-v2)? If it is the latter please open an issue on that repo. Please make sure to include additional information requested in the issue template. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
Using release version 1.9.105
I am currently facing an issue with adding MQTT functionality to my embedded system built on C/C++. So far the MQTT system seems to be working properly and efficiently under normal operating circumstances but the problem happens when the device loses connection to Wi-Fi temporarily.
During runtime the system will be in a loop where we will publish messages for the MQTT server and expect them to show up with a latency of at most, a couple seconds. In the event of a Wi-Fi outage it seems that our messages are placed in some sort of queue and upon re-connecting to Wi-Fi we can see the messages start getting sent out again. The problem here is that the time needed to see the messages re-sent is quite long for our application (~5 minutes) and when the messages are sent out from the queue again they seem to be sent quite slowly. Our system intends to publish messages to the server at 1Hz so upon an outage this can lead to many messages ending up in the queue (200-1000+ messages) which are very slow to leave the queue. We have done our due diligence and confirmed that the slowdown is not caused within our own code and this slowdown is indeed happening somewhere inside of the MQTT library. (We have confirmed that the messages are leaving our queue and sent to the MQTT library to be published to the server, but the callback function is not reached for many minutes)
Is it possible that there is some configuration in the MQTT library which can speed this process up? We have tried different QoS settings which showed no improvements for us. Alternatively, is it possible to flush the queue at some point or force the library to send all messages from the queue to the server? Is there some standard expected behavior for the library when the Wi-Fi connection is lost and then restored?
If there is anything I can help clear up about our issue or any other details I can provide please let me know.
Thanks in advance,
Noah
Beta Was this translation helpful? Give feedback.
All reactions