Replies: 2 comments 1 reply
-
Just a quick update — based on the analysis on the AWS backend, it looks like that subscription triggered an error with the reason "Throttled." |
Beta Was this translation helpful? Give feedback.
1 reply
-
Beyond that, I would suggest using the MQTT5 client over the 311 client. A number of the non-compliant edge cases (ie no ack returned) are ameliorated in MQTT5 and error reporting at the protocol level is greatly improved. Beyond that, if you have SDK logs that cover the time period you saw the behavior, we could take a look at them. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I'm using Aws::Crt::Mqtt::MqttConnection::Subscribe (SDK version v1.32.2) to subscribe to multiple AWS IoT Core MQTT topics, for example:
$aws/things/THING_ID/jobs/get/+
$aws/things/THING_ID/shadow/get/+
$aws/things/THING_ID/shadow/name/+/get/+
[...]
Each subscription waits for its SUBACK, and subscriptions can be issued in parallel. The MqttConnection is configured to not rejoin the previous session but to start a new one. So, after a reconnect, I re-subscribe to all topics.
However, I encountered a case where one of the subscriptions ($aws/things/THING_ID/shadow/name/+/get/+) did not trigger the SUBACK callback.
Based on the logs, the subscription was initiated at 2025-06-17 15:01:06.
No SUBACK was received until shutdown, when Disconnect() was called on the Aws::Crt::Mqtt::MqttConnection.
At that point, the following error was reported:
2025-06-17 17:03:56.934 ERROR [$aws/things/THING_ID/shadow/name/+/get/+] subscribe failed with error: libaws-c-mqtt: AWS_ERROR_MQTT_CANCELLED_FOR_CLEAN_SESSION, Old requests from the previous session are cancelled, and offline requests will not be accepted.
Interestingly, all other subscriptions made in parallel succeeded and received SUBACKs normally.
At connection time, I had set the protocol operation timeout to 25000 ms, so I expected the operation to time out after 25 seconds (this discussion #661 seems to suggest so), but that didn’t happen.
Unfortunately, AWS IoT logs were not enabled at the time, and I haven't been able to reproduce the issue so far.
Questions:
Any clarification or guidance would be greatly appreciated.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions