Skip to content

fix: remove duplicate subscription in c8y built-in bridge#3188

Merged
reubenmiller merged 1 commit intothin-edge:mainfrom
reubenmiller:fix-duplicate-subscription
Oct 16, 2024
Merged

fix: remove duplicate subscription in c8y built-in bridge#3188
reubenmiller merged 1 commit intothin-edge:mainfrom
reubenmiller:fix-duplicate-subscription

Conversation

@reubenmiller
Copy link
Copy Markdown
Contributor

@reubenmiller reubenmiller commented Oct 15, 2024

Proposed changes

Removing a duplicate topic subscription when using the built-in bridge with Cumulocity.

The duplicate would cause some MQTT brokers (like nanomq) to deliver two messages (one per topic) which would ultimately result in duplicate telemetry data being created in Cumulocity.

The MQTT wildcard, c8y/s/us/#, will also receive messages from c8y/s/us.

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Improvement (general improvements like code refactoring that doesn't explicitly fix a bug or add any new functionality)
  • Documentation Update (if none of the other choices apply)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Paste Link to the issue


Checklist

  • I have read the CONTRIBUTING doc
  • I have signed the CLA (in all commits with git commit -s)
  • I ran cargo fmt as mentioned in CODING_GUIDELINES
  • I used cargo clippy as mentioned in CODING_GUIDELINES
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

Further comments

Signed-off-by: Reuben Miller <reuben.d.miller@gmail.com>
@reubenmiller reubenmiller added theme:bridge Built-in (Rust) bridge topics theme:c8y Theme: Cumulocity related topics labels Oct 15, 2024
@github-actions
Copy link
Copy Markdown
Contributor

Robot Results

✅ Passed ❌ Failed ⏭️ Skipped Total Pass % ⏱️ Duration
508 0 2 508 100 1h26m18.429422999s

Copy link
Copy Markdown
Contributor

@didier-wenzek didier-wenzek left a comment

Choose a reason for hiding this comment

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

Approved.

We could also have something more systematic to remove the duplicates as this is done here

@reubenmiller
Copy link
Copy Markdown
Contributor Author

Approved.

We could also have something more systematic to remove the duplicates as this is done here

Yes, it would be a good improvement to also have a deduplication of topic subscriptions, but this can be done in a followup PR...this PR was just about the hardcoded duplication.

@reubenmiller reubenmiller added this pull request to the merge queue Oct 16, 2024
Merged via the queue into thin-edge:main with commit 2f3595e Oct 16, 2024
@reubenmiller reubenmiller added this to the 1.4.0 milestone Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

theme:bridge Built-in (Rust) bridge topics theme:c8y Theme: Cumulocity related topics

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants