Skip to content

Consider WriterGroups in MQTT KeepAlive calculation#3616

Draft
jnsjll wants to merge 1 commit intoOPCFoundation:masterfrom
jnsjll:jnsjll-pubsub-keep-alive-calculation
Draft

Consider WriterGroups in MQTT KeepAlive calculation#3616
jnsjll wants to merge 1 commit intoOPCFoundation:masterfrom
jnsjll:jnsjll-pubsub-keep-alive-calculation

Conversation

@jnsjll
Copy link
Contributor

@jnsjll jnsjll commented Mar 13, 2026

Proposed changes

According to the specification, an MQTT Keep Alive value should be set that is slightly higher than the highest KeepAliveTime setting of all writer groups.

This change calculates the KeepAliveTime considering added writer groups when starting the MqttPubSubConnection.

Related Issues

Types of changes

What types of changes does your code introduce?
Put an x in the boxes that apply. You can also fill these out after creating the PR.

  • Bugfix (non-breaking change which fixes an issue)
  • Enhancement (non-breaking change which adds functionality)
  • Test enhancement (non-breaking change to increase test coverage)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected, requires version increase of Nuget packages)
  • Documentation Update (if none of the other choices apply)

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

  • I have read the CONTRIBUTING doc.
  • I have signed the CLA.
  • I ran tests locally with my changes, all passed.
  • I fixed all failing tests in the CI pipelines.
  • I fixed all introduced issues with CodeQL and LGTM.
  • I have added tests that prove my fix is effective or that my feature works and increased code coverage.
  • I have added necessary documentation (if appropriate).
  • Any dependent changes have been merged and published in downstream modules.

Further comments

@codecov
Copy link

codecov bot commented Mar 13, 2026

Codecov Report

❌ Patch coverage is 50.00000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 66.00%. Comparing base (d25caff) to head (30c38d6).
⚠️ Report is 140 commits behind head on master.

Files with missing lines Patch % Lines
...es/Opc.Ua.PubSub/Transport/MqttPubSubConnection.cs 50.00% 3 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           master    #3616       +/-   ##
===========================================
+ Coverage   51.86%   66.00%   +14.13%     
===========================================
  Files         370      459       +89     
  Lines       78618    97826    +19208     
  Branches    13650    16383     +2733     
===========================================
+ Hits        40779    64566    +23787     
+ Misses      33705    28192     -5513     
- Partials     4134     5068      +934     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@romanett romanett requested a review from mrsuciu March 14, 2026 14:30
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.

[PubSub] MQTT Keep Alive calculation does not consider WriterGroups

1 participant