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

Support configurable tedge-mapper MQTT topics #2033

Conversation

rina23q
Copy link
Member

@rina23q rina23q commented Jun 14, 2023

Proposed changes

This PR introduces 3 new tedge config keys:

  • c8y.topics
  • az.topics
  • aws.topics

The default values of them are the topics that currently the mapper subscribes. So, by default, user will find no difference.

If you want to subscribe limited topics, try something like this.

sudo tedge config c8y.topics tedge/measurements,tedge/measurements/+

Then, c8y-mapper will subscribe the only configured topics.

Progress

  • Code
  • Robotframework
  • How-to guide

Minor changes from the current implementation

tedge/health topic variants

Currently,

But this PR changes all to subscribe to tedge/health/+ and tedge/health/+/+ by default.

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

Part 2 of #1969

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

codecov bot commented Jun 19, 2023

Codecov Report

Merging #2033 (0926c94) into main (533d657) will decrease coverage by 0.1%.
The diff coverage is 63.1%.

Additional details and impacted files
Impacted Files Coverage Δ
crates/core/tedge_mapper/src/aws/mapper.rs 0.0% <0.0%> (ø)
crates/core/tedge_mapper/src/az/mapper.rs 0.0% <0.0%> (ø)
crates/extensions/aws_mapper_ext/src/converter.rs 89.1% <ø> (+6.0%) ⬆️
crates/extensions/az_mapper_ext/src/converter.rs 96.6% <ø> (-0.2%) ⬇️
crates/extensions/c8y_mapper_ext/src/config.rs 62.9% <73.0%> (+0.2%) ⬆️
...es/common/tedge_config/src/tedge_config_cli/new.rs 90.2% <88.2%> (-0.2%) ⬇️
crates/extensions/c8y_mapper_ext/src/actor.rs 68.9% <100.0%> (-0.6%) ⬇️
crates/extensions/c8y_mapper_ext/src/converter.rs 78.8% <100.0%> (+<0.1%) ⬆️
crates/extensions/c8y_mapper_ext/src/tests.rs 93.4% <100.0%> (+<0.1%) ⬆️

... and 4 files with indirect coverage changes

@github-actions
Copy link
Contributor

github-actions bot commented Jun 19, 2023

Robot Results

✅ Passed ❌ Failed ⏭️ Skipped Total Pass %
238 0 5 238 100

Passed Tests

Name ⏱️ Duration Suite
Define Child device 1 ID 0.013 s C8Y Child Alarms Rpi
Normal case when the child device does not exist on c8y cloud 1.9969999999999999 s C8Y Child Alarms Rpi
Normal case when the child device already exists 0.832 s C8Y Child Alarms Rpi
Reconciliation when the new alarm message arrives, restart the mapper 1.003 s C8Y Child Alarms Rpi
Reconciliation when the alarm that is cleared 65.341 s C8Y Child Alarms Rpi
Prerequisite Parent 15.226 s Child Conf Mgmt Plugin
Prerequisite Child 0.169 s Child Conf Mgmt Plugin
Child device bootstrapping 14.417 s Child Conf Mgmt Plugin
Snapshot from device 61.238 s Child Conf Mgmt Plugin
Child device config update 62.461 s Child Conf Mgmt Plugin
Configuration types should be detected on file change (without restarting service) 46.763 s Inotify Crate
Check lock file existence in default folder 1.363 s Lock File
Check PID number in lock file 1.686 s Lock File
Check PID number in lock file after restarting the services 1.85 s Lock File
Check starting same service twice 1.288 s Lock File
Switch off lock file creation 2.388 s Lock File
Set configuration when file exists 6.771 s Configuration Operation
Set configuration when file does not exist 5.385 s Configuration Operation
Set configuration with broken url 5.224 s Configuration Operation
Get configuration 5.405 s Configuration Operation
Get non existent configuration file 4.825 s Configuration Operation
Get non existent configuration type 4.804 s Configuration Operation
Update configuration plugin config via cloud 4.938 s Configuration Operation
Modify configuration plugin config via local filesystem modify inplace 2.176 s Configuration Operation
Modify configuration plugin config via local filesystem overwrite 5.16 s Configuration Operation
Update configuration plugin config via local filesystem copy 3.81 s Configuration Operation
Update configuration plugin config via local filesystem move (different directory) 3.341 s Configuration Operation
Update configuration plugin config via local filesystem move (same directory) 3.6870000000000003 s Configuration Operation
Update the custom operation dynamically 52.607 s Dynamically Reload Operation
Custom operation successful 59.443 s Custom Operation
Custom operation fails 125.947 s Custom Operation
Successful firmware operation 59.367 s Firmware Operation
Install with empty firmware name 106.389 s Firmware Operation
Prerequisite Parent 17.094 s Firmware Operation Child Device
Prerequisite Child 8.082 s Firmware Operation Child Device
Child device firmware update 6.042 s Firmware Operation Child Device
Child device firmware update with cache 3.875 s Firmware Operation Child Device
Firmware plugin supports restart via service manager #1932 5.106 s Firmware Operation Child Device Retry
Update Inventory data via inventory.json 0.969 s Inventory Update
Inventory includes the agent fragment with version information 1.204 s Inventory Update
Retrieve a JWT tokens 39.734 s Jwt Request
Mapper recovers and processes output of ongoing software update request 16.236 s Recover And Publish Software Update Message
Check running collectd 1.002 s Monitor Device Collectd
Is collectd publishing MQTT messages? 2.717 s Monitor Device Collectd
Check thin-edge monitoring 3.444 s Monitor Device Collectd
Check grouping of measurements 8.573 s Monitor Device Collectd
Main device registration 1.438 s Device Registration
Child device registration 1.73 s Device Registration
Supports restarting the device 43.726 s Restart Device
Update tedge version from previous using Cumulocity 66.185 s Tedge Self Update
Test if all c8y services are up 96.332 s Service Monitoring
Test if all c8y services are down 54.672 s Service Monitoring
Test if all c8y services are using configured service type 168.225 s Service Monitoring
Test if all c8y services using default service type when service type configured as empty 144.412 s Service Monitoring
Check health status of tedge-mapper-c8y service on broker stop start 19.126 s Service Monitoring
Check health status of tedge-mapper-c8y service on broker restart 21.515 s Service Monitoring
Check health status of child device service 17.44 s Service Monitoring
Successful shell command with output 3.255 s Shell Operation
Check Successful shell command with literal double quotes output 3.111 s Shell Operation
Execute multiline shell command 3.188 s Shell Operation
Failed shell command 3.108 s Shell Operation
Software list should be populated during startup 23.695 s Software
Install software via Cumulocity 38.158 s Software
Software list should only show currently installed software and not candidates 40.173 s Software
Create and publish the tedge agent supported operations on mapper restart 28.741 s Mapper-Publishing-Agent-Supported-Ops
Agent gets the software list request once it comes up 31.222 s Mapper-Publishing-Agent-Supported-Ops
Child devices support sending simple measurements 1.289 s Child Device Telemetry
Child devices support sending custom measurements 0.981 s Child Device Telemetry
Child devices support sending custom events 1.1400000000000001 s Child Device Telemetry
Child devices support sending custom events overriding the type 1.092 s Child Device Telemetry
Child devices support sending custom alarms #1699 0.941 s Child Device Telemetry
Child devices support sending inventory data via c8y topic 1.119 s Child Device Telemetry
Child device supports sending custom child device measurements directly to c8y 1.697 s Child Device Telemetry
Check retained alarms 30.492 s Raise Alarms
Thin-edge devices support sending simple measurements 1.5779999999999998 s Thin-Edge Device Telemetry
Thin-edge devices support sending simple measurements with custom type 1.311 s Thin-Edge Device Telemetry
Thin-edge devices support sending custom measurements 1.2690000000000001 s Thin-Edge Device Telemetry
Thin-edge devices support sending custom events 1.083 s Thin-Edge Device Telemetry
Thin-edge devices support sending custom events overriding the type 1.108 s Thin-Edge Device Telemetry
Thin-edge devices support sending custom alarms #1699 3.409 s Thin-Edge Device Telemetry
Thin-edge device supports sending custom Thin-edge device measurements directly to c8y 1.725 s Thin-Edge Device Telemetry
Thin-edge device support sending inventory data via c8y topic 1.329 s Thin-Edge Device Telemetry
thin-edge components support a custom config-dir location via flags 27.464 s Config Dir
Validate updated data path used by tedge-agent 0.556 s Data Path Config
Validate updated data path used by c8y-firmware-plugin 10.45 s Data Path Config
Validate updated data path used by tedge-agent 1.007 s Log Path Config
Check existence of init directories 1.525 s Tedge Init
Tedge init and check creation of folders 1.26 s Tedge Init
Check ownership of the folders 1.105 s Tedge Init
Change user/group and check the change 1.3639999999999999 s Tedge Init
Tedge init and check if default values are restored 1.1219999999999999 s Tedge Init
Install thin-edge via apt 60.195 s Install Apt
Install latest via script (from current branch) 28.854 s Install Tedge
Install specific version via script (from current branch) 28.858 s Install Tedge
Install latest tedge via script (from main branch) 25.515 s Install Tedge
Install then uninstall latest tedge via script (from main branch) 62.489 s Install Tedge
Support starting and stopping services 44.65 s Service-Control
Supports a reconnect 62.523 s Test-Commands
Supports disconnect then connect 35.792 s Test-Commands
Update unknown setting 32.264 s Test-Commands
Update known setting 33.894 s Test-Commands
It checks MQTT messages using a pattern 77.263 s Test-Mqtt
Stop c8y-configuration-plugin 0.148 s Health C8Y-Configuration-Plugin
Update the service file 0.094 s Health C8Y-Configuration-Plugin
Reload systemd files 0.458 s Health C8Y-Configuration-Plugin
Start c8y-configuration-plugin 0.102 s Health C8Y-Configuration-Plugin
Start watchdog service 10.212 s Health C8Y-Configuration-Plugin
Check PID of c8y-configuration-plugin 0.184 s Health C8Y-Configuration-Plugin
Kill the PID 0.231 s Health C8Y-Configuration-Plugin
Recheck PID of c8y-configuration-plugin 6.408 s Health C8Y-Configuration-Plugin
Compare PID change 0.001 s Health C8Y-Configuration-Plugin
Stop watchdog service 0.086 s Health C8Y-Configuration-Plugin
Remove entry from service file 0.113 s Health C8Y-Configuration-Plugin
Stop c8y-log-plugin 0.151 s Health C8Y-Log-Plugin
Update the service file 0.081 s Health C8Y-Log-Plugin
Reload systemd files 0.467 s Health C8Y-Log-Plugin
Start c8y-log-plugin 0.128 s Health C8Y-Log-Plugin
Start watchdog service 10.166 s Health C8Y-Log-Plugin
Check PID of c8y-log-plugin 0.085 s Health C8Y-Log-Plugin
Kill the PID 0.181 s Health C8Y-Log-Plugin
Recheck PID of c8y-log-plugin 6.362 s Health C8Y-Log-Plugin
Compare PID change 0.001 s Health C8Y-Log-Plugin
Stop watchdog service 0.238 s Health C8Y-Log-Plugin
Remove entry from service file 0.148 s Health C8Y-Log-Plugin
Stop tedge-mapper 0.146 s Health Tedge Mapper C8Y
Update the service file 0.242 s Health Tedge Mapper C8Y
Reload systemd files 0.555 s Health Tedge Mapper C8Y
Start tedge-mapper 0.155 s Health Tedge Mapper C8Y
Start watchdog service 10.436 s Health Tedge Mapper C8Y
Check PID of tedge-mapper 0.082 s Health Tedge Mapper C8Y
Kill the PID 0.184 s Health Tedge Mapper C8Y
Recheck PID of tedge-mapper 6.525 s Health Tedge Mapper C8Y
Compare PID change 0.011 s Health Tedge Mapper C8Y
Stop watchdog service 0.373 s Health Tedge Mapper C8Y
Remove entry from service file 0.295 s Health Tedge Mapper C8Y
Stop tedge-agent 0.174 s Health Tedge-Agent
Update the service file 0.301 s Health Tedge-Agent
Reload systemd files 0.469 s Health Tedge-Agent
Start tedge-agent 0.172 s Health Tedge-Agent
Start watchdog service 10.291 s Health Tedge-Agent
Check PID of tedge-mapper 0.057 s Health Tedge-Agent
Kill the PID 0.196 s Health Tedge-Agent
Recheck PID of tedge-agent 6.552 s Health Tedge-Agent
Compare PID change 0.001 s Health Tedge-Agent
Stop watchdog service 0.27 s Health Tedge-Agent
Remove entry from service file 0.174 s Health Tedge-Agent
Stop tedge-mapper-az 0.148 s Health Tedge-Mapper-Az
Update the service file 0.162 s Health Tedge-Mapper-Az
Reload systemd files 0.86 s Health Tedge-Mapper-Az
Start tedge-mapper-az 0.159 s Health Tedge-Mapper-Az
Start watchdog service 10.455 s Health Tedge-Mapper-Az
Check PID of tedge-mapper-az 0.238 s Health Tedge-Mapper-Az
Kill the PID 0.353 s Health Tedge-Mapper-Az
Recheck PID of tedge-agent 6.479 s Health Tedge-Mapper-Az
Compare PID change 0.001 s Health Tedge-Mapper-Az
Stop watchdog service 0.141 s Health Tedge-Mapper-Az
Remove entry from service file 0.111 s Health Tedge-Mapper-Az
Stop tedge-mapper-collectd 0.303 s Health Tedge-Mapper-Collectd
Update the service file 0.217 s Health Tedge-Mapper-Collectd
Reload systemd files 0.555 s Health Tedge-Mapper-Collectd
Start tedge-mapper-collectd 0.343 s Health Tedge-Mapper-Collectd
Start watchdog service 10.456 s Health Tedge-Mapper-Collectd
Check PID of tedge-mapper-collectd 0.14 s Health Tedge-Mapper-Collectd
Kill the PID 0.298 s Health Tedge-Mapper-Collectd
Recheck PID of tedge-mapper-collectd 6.5280000000000005 s Health Tedge-Mapper-Collectd
Compare PID change 0.005 s Health Tedge-Mapper-Collectd
Stop watchdog service 0.171 s Health Tedge-Mapper-Collectd
Remove entry from service file 0.095 s Health Tedge-Mapper-Collectd
tedge-collectd-mapper health status 5.521 s Health Tedge-Mapper-Collectd
c8y-log-plugin health status 5.521 s MQTT health endpoints
c8y-configuration-plugin health status 5.463 s MQTT health endpoints
Publish on a local insecure broker 0.476 s Basic Pub Sub
Publish on a local secure broker 3.953 s Basic Pub Sub
Publish on a local secure broker with client authentication 3.607 s Basic Pub Sub
Publish events to subscribed topic 0.359 s Custom Sub Topics Tedge-Mapper-Aws
Publish measurements to unsubscribed topic 5.477 s Custom Sub Topics Tedge-Mapper-Aws
Publish measurements to subscribed topic 0.37 s Custom Sub Topics Tedge-Mapper-Az
Publish measurements to unsubscribed topic 5.447 s Custom Sub Topics Tedge-Mapper-Az
Publish events to subscribed topic 0.257 s Custom Sub Topics Tedge-Mapper-C8Y
Publish measurements to unsubscribed topic 5.341 s Custom Sub Topics Tedge-Mapper-C8Y
Check remote mqtt broker #1773 3.025 s Remote Mqtt Broker
Apply name filter 0.261 s Filter Packages List Output
Apply maintainer filter 0.242 s Filter Packages List Output
Apply both filters 0.18 s Filter Packages List Output
No filters 0.208 s Filter Packages List Output
Both filters but name filter as empty string 0.213 s Filter Packages List Output
Both filters but maintainer filter as empty string 0.191 s Filter Packages List Output
Both filters as empty string 0.165 s Filter Packages List Output
Wrong package name 0.142 s Improve Tedge Apt Plugin Error Messages
Wrong version 0.187 s Improve Tedge Apt Plugin Error Messages
Wrong type 0.48 s Improve Tedge Apt Plugin Error Messages
tedge_connect_test_positive 0.22 s Tedge Connect Test
tedge_connect_test_negative 0.692 s Tedge Connect Test
tedge_connect_test_sm_services 6.949 s Tedge Connect Test
tedge_disconnect_test_sm_services 60.328 s Tedge Connect Test
Install thin-edge.io 17.274 s Call Tedge
call tedge -V 0.082 s Call Tedge
call tedge -h 0.104 s Call Tedge
call tedge -h -V 0.124 s Call Tedge
call tedge help 0.08 s Call Tedge
tedge config list 0.091 s Call Tedge Config List
tedge config list --all 0.123 s Call Tedge Config List
set/unset device.type 0.478 s Call Tedge Config List
set/unset device.key_path 0.402 s Call Tedge Config List
set/unset device.cert_path 0.432 s Call Tedge Config List
set/unset c8y.root_cert_path 0.445 s Call Tedge Config List
set/unset c8y.smartrest.templates 0.399 s Call Tedge Config List
set/unset c8y.topics 0.467 s Call Tedge Config List
set/unset az.root_cert_path 0.56 s Call Tedge Config List
set/unset az.topics 0.323 s Call Tedge Config List
set/unset aws.topics 0.272 s Call Tedge Config List
set/unset aws.url 0.38 s Call Tedge Config List
set/unset aws.root_cert_path 0.291 s Call Tedge Config List
set/unset aws.mapper.timestamp 0.233 s Call Tedge Config List
set/unset az.mapper.timestamp 0.285 s Call Tedge Config List
set/unset mqtt.bind.address 0.376 s Call Tedge Config List
set/unset mqtt.bind.port 0.365 s Call Tedge Config List
set/unset http.bind.port 0.34 s Call Tedge Config List
set/unset tmp.path 0.282 s Call Tedge Config List
set/unset logs.path 0.315 s Call Tedge Config List
set/unset run.path 0.257 s Call Tedge Config List
set/unset firmware.child.update.timeout 0.291 s Call Tedge Config List
set/unset c8y.url 0.303 s Call Tedge Config List
set/unset az.url 0.258 s Call Tedge Config List
set/unset mqtt.external.bind.port 0.249 s Call Tedge Config List
mqtt.external.bind.address 0.259 s Call Tedge Config List
mqtt.external.bind.interface 0.234 s Call Tedge Config List
set/unset mqtt.external.ca_path 0.249 s Call Tedge Config List
set/unset mqtt.external.cert_file 0.264 s Call Tedge Config List
set/unset mqtt.external.key_file 0.249 s Call Tedge Config List
set/unset software.plugin.default 0.239 s Call Tedge Config List
Get Put Delete 1.533 s Http File Transfer Api
Set keys should return value on stdout 0.138 s Tedge Config Get
Unset keys should not return anything on stdout and warnings on stderr 0.274 s Tedge Config Get
Invalid keys should not return anything on stdout and warnings on stderr 0.241 s Tedge Config Get
Set configuration via environment variables 0.858 s Tedge Config Get
Set configuration via environment variables for topics 0.353 s Tedge Config Get
Set unknown configuration via environment variables 0.183 s Tedge Config Get

@rina23q rina23q marked this pull request as ready for review June 19, 2023 15:03
@rina23q rina23q force-pushed the improve/1918/support-configurable-tedge-mapper-mqtt-topics branch from db59319 to 9e80f45 Compare June 20, 2023 12:52
Copy link
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.

I have a question: what's the expected behavior of the mapper if the user adds a topic that is not a topic related to measurements/alarms/events?

@rina23q rina23q temporarily deployed to Test Pull Request June 23, 2023 12:31 — with GitHub Actions Inactive
@rina23q rina23q force-pushed the improve/1918/support-configurable-tedge-mapper-mqtt-topics branch from 99a9ece to d412801 Compare June 26, 2023 14:26
@rina23q rina23q temporarily deployed to Test Pull Request June 26, 2023 14:35 — with GitHub Actions Inactive
*** Test Cases ***
Publish events to subscribed topic
Execute Command mosquitto_pub -t tedge/events/event-type -m '{"text": "Event"}'
Should Have MQTT Messages c8y/s/us
Copy link
Contributor

Choose a reason for hiding this comment

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

You have to be more specific with your comparison as there might be other messages that are published to c8y/s/us which will cause the test to pass.

The Should Have MQTT Messages supports a message pattern named argument, message_pattern:

Should Have MQTT Messages    c8y/s/us    message_pattern=.*Event.*

Or something to that effect (not 100% sure on what the expected payload is in this case, I would have expected it to be published on the json via mqtt topic c8y/event/events...but I can't remember the exact implementation for events).

Copy link
Member Author

Choose a reason for hiding this comment

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

Actually, event is converted to SmartREST like below.

[c8y/s/us] 400,event-type,"Event",2023-06-28T17:30:21.529621713Z

Copy link
Contributor

Choose a reason for hiding this comment

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

Though I’m sure there are other messages being sent to the same topic, so we have to be sure the assertion is specific enough.

Comment on lines 3 to 5
The cloud-specific mappers subscribe to the reserved MQTT topics and convert incoming MQTT messages to cloud-specific messages.
In an advanced use case, such as using more than one cloud mappers for the same device,
you may want to customize the MQTT topics that each cloud mapper subscribes to.
Copy link
Contributor

Choose a reason for hiding this comment

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

Though doesn't this setting control which tedge topics are subscribe to by each mapper, and not the data coming from each cloud?

Copy link
Member Author

Choose a reason for hiding this comment

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

True. For example, c8y/s/us is not a candidate to be configured by tedge-mapper-c8y.

Copy link
Contributor

@reubenmiller reubenmiller left a comment

Choose a reason for hiding this comment

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

Just some minor tweaks and improvements to the robot tests and some minor doc updates.

Copy link
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 the code being correct. I let you address the changes requested by Reuben for docs and tests.

Comment on lines -41 to -50
vec![
"tedge/measurements",
"tedge/measurements/+",
"tedge/health",
"tedge/health/+",
"tedge/events/+",
"tedge/events/+/+",
"tedge/alarms/+/+",
"tedge/alarms/+/+/+",
]
Copy link
Contributor

Choose a reason for hiding this comment

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

A bit annoying to see this topic list moved into the tedge-config crate as a default value while this is key for the behavior of this mapper. Unfortunately, I see no immediate way to define the list in this crate and use it as a default in tedge-config.

@rina23q rina23q temporarily deployed to Test Pull Request June 28, 2023 21:43 — with GitHub Actions Inactive
Copy link
Contributor

@reubenmiller reubenmiller left a comment

Choose a reason for hiding this comment

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

Approved

@rina23q rina23q temporarily deployed to Test Pull Request June 29, 2023 12:21 — with GitHub Actions Inactive
@rina23q rina23q force-pushed the improve/1918/support-configurable-tedge-mapper-mqtt-topics branch from 2356c6f to c4a00a1 Compare June 29, 2023 12:46
@rina23q rina23q temporarily deployed to Test Pull Request June 29, 2023 12:55 — with GitHub Actions Inactive
@rina23q rina23q force-pushed the improve/1918/support-configurable-tedge-mapper-mqtt-topics branch from c4a00a1 to d61077c Compare July 6, 2023 13:53
@rina23q rina23q force-pushed the improve/1918/support-configurable-tedge-mapper-mqtt-topics branch from d61077c to 0926c94 Compare July 6, 2023 14:06
@rina23q rina23q temporarily deployed to Test Pull Request July 6, 2023 14:17 — with GitHub Actions Inactive
Copy link
Contributor

@reubenmiller reubenmiller left a comment

Choose a reason for hiding this comment

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

Approved

Some users want c8y-mapper to subscribe selected topics.
Introduce `c8y.topics` tedge config key to support such use-case.

Change those topics to be configurable, and they are the default value
of `c8y.topics`.
- tedge/measurements
- tedge/measurements/+
- tedge/alarms/+/+
- tedge/alarms/+/+/+
- tedge/events/+
- tedge/events/+/+
- tedge/health/+
- tedge/health/+/+

Signed-off-by: Rina Fujino <18257209+rina23q@users.noreply.github.com>
Some users want az-mapper to subscribe selected topics.
Introduce `az.topics` tedge config key to support such use-case.

Change those topics to be configurable, and they are the default value
of `az.topics`.
- tedge/measurements
- tedge/measurements/+

Signed-off-by: Rina Fujino <18257209+rina23q@users.noreply.github.com>
Some users want aws-mapper to subscribe selected topics.
Introduce `aws.topics` tedge config key to support such use-case.

Change those topics to be configurable, and they are the default value
of `aws.topics`.
- tedge/measurements
- tedge/measurements/+
- tedge/alarms/+/+
- tedge/alarms/+/+/+
- tedge/events/+
- tedge/events/+/+
- tedge/health
- tedge/health/+

Signed-off-by: Rina Fujino <18257209+rina23q@users.noreply.github.com>
All cloud mappers subscribe to
- tedge/health/+
- tedge/health/+/+

Signed-off-by: Rina Fujino <18257209+rina23q@users.noreply.github.com>
Signed-off-by: Rina Fujino <18257209+rina23q@users.noreply.github.com>
Signed-off-by: Rina Fujino <18257209+rina23q@users.noreply.github.com>
Signed-off-by: Rina Fujino <18257209+rina23q@users.noreply.github.com>
@rina23q rina23q force-pushed the improve/1918/support-configurable-tedge-mapper-mqtt-topics branch from 0926c94 to e56f6e3 Compare July 7, 2023 10:57
@rina23q rina23q temporarily deployed to Test Pull Request July 7, 2023 11:07 — with GitHub Actions Inactive
@rina23q rina23q merged commit 119fcaa into thin-edge:main Jul 7, 2023
16 checks passed
@rina23q rina23q deleted the improve/1918/support-configurable-tedge-mapper-mqtt-topics branch July 7, 2023 11:44
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