Skip to content

Fix edgeHub MQTT connection timeouts caused by DotNetty downgrade - #7539

Open
Bilal Sellak (bilalsellak) wants to merge 1 commit into
Azure:mainfrom
bilalsellak:fix/pin-dotnetty-0.7.6
Open

Fix edgeHub MQTT connection timeouts caused by DotNetty downgrade#7539
Bilal Sellak (bilalsellak) wants to merge 1 commit into
Azure:mainfrom
bilalsellak:fix/pin-dotnetty-0.7.6

Conversation

@bilalsellak

@bilalsellak Bilal Sellak (bilalsellak) commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Summary
Fixes an edgeHub MQTT/TLS failure where the client completes TLS and sends MQTT CONNECT, but edgeHub does not receive the decrypted MQTT packet and therefore never returns CONNACK.

Root cause
The .NET 10 and Device SDK update removed a transitive dependency that previously raised DotNetty to 0.7.6. Microsoft.Azure.Devices.ProtocolGateway.Core 2.0.1 still declares 0.6.0, causing NuGet to resolve the MQTT server stack back to DotNetty 0.6.0.

DotNetty 0.6.0 can lose application data received around TLS handshake completion, particularly when the final TLS flight and MQTT CONNECT arrive together with AutoRead=false.

Fix

  • Add direct references to DotNetty.Codecs.Mqtt and DotNetty.Handlers 0.7.6.

Validation

  • A controlled .NET 10 TLS reproduction produced:

  • DotNetty 0.6.0, TLS + MQTT: 0/30 delivered

  • DotNetty 0.7.6, same input: 30/30 delivered

Repository validation:

Release build succeeded.
All 192 MQTT unit tests passed.
Generated runtime manifest contains only DotNetty 0.7.6 packages.
No DotNetty 0.6.0 runtime assets remain.

Azure IoT Edge PR checklist:

This checklist is used to make sure that common guidelines for a pull request are followed.

General Guidelines and Best Practices

  • [ x] I have read the contribution guidelines.
  • [x ] Title of the pull request is clear and informative.
  • [ x] Description of the pull request includes a concise summary of the enhancement or bug fix.

Testing Guidelines

  • [x ] Pull request includes test coverage for the included changes.
  • Description of the pull request includes
    • [x ] concise summary of tests added/modified
    • local testing done.

Draft PRs

  • Open the PR in Draft mode if it is:
    • Work in progress or not intended to be merged.
    • Encountering multiple pipeline failures and working on fixes.

Note: We use the kodiakhq bot to merge PRs once the necessary checks and approvals are in place. When it merges a PR, kodiakhq converts the PR title to the commit title, PR description to the commit description, and squashes all the commits in the PR to a single commit. The net effect is that entire PR becomes a single commit. Please follow the best practices mentioned here for the PR title and description

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.

1 participant