fix: Prevent AWS_ERROR_MQTT_UNEXPECTED_HANGUP connection interruptions (#179)

By using a stable, unique per-process client identifier.

Also:

- Configured MQTT auto-reconnect on interruption
- Reset connection on high MQTT connection interruption rate
This commit is contained in:
Pascal Bourque
2025-11-08 15:12:30 -05:00
committed by GitHub
parent d007c2d745
commit 94acdede23
3 changed files with 75 additions and 7 deletions

21
package-lock.json generated
View File

@@ -14,7 +14,8 @@
"amazon-cognito-identity-js": "6.3.15",
"aws-iot-device-sdk-v2": "1.22.0",
"dayjs": "1.11.18",
"lodash": "4.17.21"
"lodash": "4.17.21",
"nanoid": "5.1.6"
},
"devDependencies": {
"@eslint/js": "9.38.0",
@@ -8094,6 +8095,24 @@
"thenify-all": "^1.0.0"
}
},
"node_modules/nanoid": {
"version": "5.1.6",
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-5.1.6.tgz",
"integrity": "sha512-c7+7RQ+dMB5dPwwCp4ee1/iV/q2P6aK1mTZcfr1BTuVlyW9hJYiMPybJCcnBlQtuSmTIWNeazm/zqNoZSSElBg==",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/ai"
}
],
"license": "MIT",
"bin": {
"nanoid": "bin/nanoid.js"
},
"engines": {
"node": "^18 || >=20"
}
},
"node_modules/natural-compare": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz",