Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Limit Azure IoT Hub downlink retries #603

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

jburhenn
Copy link

If the publishCommand function for Azure IoT Hub gets an error when sending a cloud-to-device message it retries forever so it may never finish. This change adds a retry limit to prevent that. It also adds a test case for testing Azure IoT Hub downlinks.

@@ -0,0 +1,52 @@
package azureiothub
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unless TEST_AZURE_IOT_HUB_EVENTS_CONNECTION_STRING and TEST_AZURE_IOT_HUB_COMMANDS_CONNECTION_STRING env variables exist, this tests would fail. Maybe a build tag should be added to explicitly enable this test?

// +build integration

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added integration build tag.

@asanchezdelc
Copy link

@brocaar Another thing we observed is that when the limit is reached for a particular device, IoT Hub returns the error below and endlessly retries connecting to IoT Hub even though is not a "connection" error. For now this is more of a immediate hotfix, lookout for another PR later on that actually checks for Device Queue Limit.
Screenshot 2023-05-17 at 11 56 15 AM

@jburhenn
Copy link
Author

Added a change for the queue limit exceeded error. Now it only recreates the sender link instead of doing a full reconnection since that error doesn't require a reconnect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants