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

Fix DUP flag in re-sent telemetry over MQTT protocol #2519

Merged
merged 1 commit into from
Aug 15, 2023

Conversation

ewertons
Copy link
Contributor

Checklist

  • I have read the [contribution guidelines] (https://github.com/Azure/azure-iot-sdk-c/blob/main/.github/CONTRIBUTING.md).
  • I added or modified the existing tests to cover the change (we do not allow our test coverage to go down).
  • If this is a modification that impacts the behavior of a public API
    • I edited the corresponding document in the devdoc folder and added or modified requirements.
  • I submitted this PR against the correct branch:
    • This pull-request is submitted against the main branch.
    • I have merged the latest main branch prior to submission and re-merged as needed after I took any feedback.
    • I have squashed my changes into one with a clear description of the change.

Reference/Link to the issue solved with this PR (if any)

#2514

Description of the problem

Unfortunately telemetry messages that are resent by the MQTT transport are not marked with the DUP flag as TRUE (as should by spec MQTT-3.3.1-2).

Description of the solution

Set the DUP flag for telemetry messages resent by the MQTT transport.

Note that telemetry messages are always sent by the azure-iot-sdk-c MQTT transport with QOS1, so no control is necessary for the DUP flag related to QOS0.

azure-iot-sdk-c's MQTT transport does not attempt ot resend TWIN messages or direct methods responses, so this fix does not apply to these messaging features.

Unfortunately telemetry messages that are resent by the MQTT transport
are not marked with the DUP flag as TRUE (as should by spec MQTT-3.3.1-2).
Note that telemetry messages are always sent by the azure-iot-sdk-c MQTT
transport with QOS1, so no control is necessary for the DUP flag related to QOS0.
azure-iot-sdk-c's MQTT transport does not attempt ot resend TWIN messages
or direct methods responses, so this fix does not apply to these
messaging features.
Related issue: #2514
Copy link
Member

@CIPop CIPop left a comment

Choose a reason for hiding this comment

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

Thanks @ewertons !

@ewertons ewertons merged commit adcf1ea into main Aug 15, 2023
37 checks passed
@ewertons ewertons deleted the ewertons/fixmqtttelemetrydupflag branch August 15, 2023 20:54
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.

None yet

4 participants