feat: Add cleanSession config, SDK v1.40.2 support, and Fedora build#526
Draft
eduelias wants to merge 2 commits into
Draft
feat: Add cleanSession config, SDK v1.40.2 support, and Fedora build#526eduelias wants to merge 2 commits into
eduelias wants to merge 2 commits into
Conversation
- Add configurable 'clean-session' MQTT option to prevent DUPLICATE_CLIENT_ID - Update AWS IoT Device SDK to v1.40.2 (0d29d85a) - Fix socket API compatibility for secure tunneling and sensor-publish - Improve disconnect cleanup with forced connection reset - Enhance systemd service configuration for graceful shutdown - Add Fedora 42 Docker build support - Replace vfork() with fork() in JobEngine - Fix dangling pointer in ConfigShadow These changes improve connection reliability and add support for the latest SDK version with all features enabled.
|
If you are looking for the team to review, please publish your PR. Until then we will not be reviewing. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
This PR addresses MQTT connection reliability issues and adds support for the latest AWS IoT Device SDK C++ v2 (v1.40.2), along with improved build support for Fedora-based systems.
Background:
DUPLICATE_CLIENT_IDerrors during unclean service restartsIssue number: N/A (proactive improvements)
Modifications
Change summary
1. Configurable Clean Session Flag
clean-sessionboolean configuration option (defaults totrue)DUPLICATE_CLIENT_IDerrors by automatically disconnecting previous sessionsConfig.h,Config.cpp,config-template.json, and documentation2. AWS IoT Device SDK C++ v2 Update to v1.40.2
74c8b683to0d29d85a(v1.40.2)TcpForward.cppandSocket.hto use newaws_socket_connect_optionsstructure3. Improved MQTT Disconnect Handling
SharedCrtResourceManager::disconnect()with forced cleanup on timeout4. Enhanced Systemd Service Configuration
TimeoutStopSecto 30 seconds for graceful MQTT disconnectKillMode=mixedandSIGTERM→SIGKILLcascade5. Fedora Build Support
docker-build.shscript6. Additional Fixes
vfork()withfork()inJobEngine.cpp(more portable, safer)ConfigShadow.cpp.dockerignorefor cleaner Docker buildsRevision diff summary
This is the initial submission.
Testing
Is your change tested? If not, please justify the reason.
✅ Yes, changes have been tested locally.
Please list your testing steps and test results.
WIP: Working on updating/fixing the tests now
1. macOS ARM64 Build Test