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

Implement a converter that bridges the old MEA topics to the new ones. #2079

Closed
didier-wenzek opened this issue Jul 19, 2023 · 3 comments
Closed
Assignees
Labels
refactoring Developer value theme:mqtt Theme: mqtt and mosquitto related topics
Milestone

Comments

@didier-wenzek
Copy link
Contributor

didier-wenzek commented Jul 19, 2023

As we plan a major refactoring of all the MQTT topics used by thin-edge, we have to provide some backward compatibilities. During a transition period, thin-edge will support the old as well as the new schemes, using a converter that re-publishes any measurement, event or alarm received on a tedge/# topic to the appropriate new te/# topic.

  • All the messages must be re-published unchanged - same content, QoS and retain flag, from the old to the new topic.
  • There is only one exception for the severity of the alarms (that has to be extracted from the tedge topic and pushed into the json payload of the message).
  • The complete specifications of this conversion are here.
  • The simpler is to use a Converter and to launch this actor inside the tedge-agent.
@PradeepKiruvale
Copy link
Contributor

PradeepKiruvale commented Aug 3, 2023

The table below shows mapping the tedge topic to the te topic and if there are any changes needed.

tedge topic te topic other updates
tedge/measurements te/device/main///m/
tedge/measurements/child te/device/child///m/
tedge/alarms/severity/alarm_type te/device/main///a/alarm_type add severity into payload
tedge/alarms/severity/child/alarm_type te/device/child///a/alarm_type add severity into payload
tedge/events/event_type te/device/main///e/event_type
tedge/events/child/event_type te/device/child///e/event_type
tedge/commands/res/software/list te/device/main/cmd/software_list/<cmd_id>
tedge/commands/res/software/update te/device/main/cmd/software_update/<cmd_id>
tedge/+/commands/res/config_snapshot te/device/main/cmd/config_snapshot/<cmd_id>
tedge/+/commands/res/config_snapshot te/device/child/cmd/config_snapshot/<cmd_id>
tedge/+/commands/res/config_update te/device/main/cmd/config_update/<cmd_id>
tedge/+/commands/res/config_update te/device/child/cmd/config_update/<cmd_id>
tedge/+/commands/res/firmware_update te/device/main/cmd/firmware_update/<cmd_id>
tedge/+/commands/res/firmware_update te/device/child/cmd/firmware_update/<cmd_id>
tedge/commands/res/control/restart te/device/main/cmd/restart/<cmd_id>
tedge/health/servcie-name te/device/+/service/tedge-agent/status/health

@gligorisaev
Copy link
Contributor

@PradeepKiruvale the test case that is part of your PR is not verifiing the first point of Didier description:
'All the messages must be re-published unchanged - same content, QoS and retain flag, from the old to the new topic.'

@gligorisaev
Copy link
Contributor

QA has thoroughly checked the feature and here are the results:

  • Test for ticket exists in the test suite.
    /tests/RobotFramework/tests/tedge_to_te_converter/convert_tedge_topics_to_te_topics.robot
  • QA has tested the feature and it meets the required specifications.

@reubenmiller reubenmiller added this to the 0.13.0 milestone Aug 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactoring Developer value theme:mqtt Theme: mqtt and mosquitto related topics
Projects
None yet
Development

No branches or pull requests

4 participants