Skip to content

feat: add c8y createBulk topics to bridge#3286

Merged
reubenmiller merged 1 commit intothin-edge:mainfrom
reubenmiller:feat-c8y-bulk-create-topics
Dec 9, 2024
Merged

feat: add c8y createBulk topics to bridge#3286
reubenmiller merged 1 commit intothin-edge:mainfrom
reubenmiller:feat-c8y-bulk-create-topics

Conversation

@reubenmiller
Copy link
Copy Markdown
Contributor

Proposed changes

Add Cumulocity bulk telemetry creattion topics to the bridge (both mosquitto bridge and built-in bridge):

This enables users to publish bulk measurements using the following topics:

  • c8y/event/events/createBulk
  • c8y/alarm/alarms/createBulk
  • c8y/measurement/measurements/createBulk

See Cumulocity documentation for details.

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

#3203

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

@codecov
Copy link
Copy Markdown

codecov bot commented Dec 7, 2024

Codecov Report

Attention: Patch coverage is 56.25000% with 7 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
crates/core/tedge_mapper/src/c8y/mapper.rs 0.00% 7 Missing ⚠️
Additional details and impacted files

📢 Thoughts on this report? Let us know!

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Dec 7, 2024

Robot Results

✅ Passed ❌ Failed ⏭️ Skipped Total Pass % ⏱️ Duration
538 0 2 538 100 1h30m54.003145999s

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.

For thin-edge point of view this is just a new bridge entry, so this is okay. But to be honest, I really don't see the point of this bulk API over MQTT. Bulk creation requests fully make sense over a request/response protocol where you expect back an identifier for each new items or when there is a transaction contract and atomicity requirements. But here, over MQTT, there is no responses, no returned ids, no atomic batch creation.

@reubenmiller
Copy link
Copy Markdown
Contributor Author

For thin-edge point of view this is just a new bridge entry, so this is okay. But to be honest, I really don't see the point of this bulk API over MQTT. Bulk creation requests fully make sense over a request/response protocol where you expect back an identifier for each new items or when there is a transaction contract and atomicity requirements. But here, over MQTT, there is no responses, no returned ids, no atomic batch creation.

It's mainly useful for users who want to send a lot of measurements in one go. For instance, if there is a process which collects daily statistics (e.g. 10min averages) and wants to publish the day's values at the end of each day (I've seen this logic in wind turbines). Sending the measurements as individual measurements makes it harder to confirm that all of the day's measurements have been sent to the cloud. Whilst in the cloud, you still allow the users to query for the individual measurements (rather than grouping multiple data points into a single measurement).

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

Labels

theme:c8y Theme: Cumulocity related topics

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants