Use QoS 0: get error libaws-c-mqtt: AWS_ERROR_MQTT_NOT_CONNECTED, The requested operation is invalid as the connection is not open
#546
Replies: 3 comments
-
If you are truly changing nothing but the QoS level from 1 to 0 and getting a disconnect (vs. a successful publish) then that is a mystery that would best be addressed by the AWS IoT service team. If you're changing something else too (in particular, the topic published to), then it is likely a permission error in the associated IAM policy. |
Beta Was this translation helpful? Give feedback.
-
I confirmed that only the update from 1 to 0 was made and that nothing else was changed, and encountered the error. |
Beta Was this translation helpful? Give feedback.
-
Can you post Debug-level SDK logs of a good run side-by-side with SDK logs from a bad run? Logs can be enabled with: https://github.com/awslabs/aws-crt-nodejs/blob/main/lib/native/io.ts#L67 |
Beta Was this translation helpful? Give feedback.
-
Hi all,
When I use publish with qos is set 0, immediately get the error
Stack: Error: Failed to connect: libaws-c-mqtt: AWS_ERROR_MQTT_UNEXPECTED_HANGUP, The connection was closed unexpectedly
. Please note that it works fine when qos is set to 1. Any one get the same issue? I tried to debug and found the exceltipn at line 342 in the filenode_modules/aws-crt/dist/native/mqtt.js
as belowThanks
Beta Was this translation helpful? Give feedback.
All reactions