Repository navigation
csapi-mqtt: Part 3 topic scheme (new module, 0.1.0) - #261
Merged
Merged
Conversation
This was referenced Nov 5, 2026
This was referenced Nov 6, 2026
8 tasks done
alexrobin
self-requested a review
November 11, 2026 23:55
alexrobin
approved these changes
Nov 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
sensorhub-service-csapi-mqtt0.1.0, a new module with the CS API Part 3 topic scheme. The legacy modulesensorhub-service-consys-mqttdoes not change, so existing clients keep the legacy topics (#274).Closes #250, closes #251, closes #252, closes #253, closes #274. Part of #249.
Changes
{nodeId}/(new config, defaultapi). The nodeId is checked at init: one topic level, no/,+,#or NUL, no leading$. (consys-mqtt: add {nodeId} topic prefix #251):dataon the last collection name and use the full{systemPath}, for exampleapi/systems/134/subsystems/7/datastreams/12/observations:data. Only the topic templates of Part 3 are accepted. (consys-mqtt: add :data Resource Data topics #252):data/{format}selects a format. The token comes from the media type (remove parameters andapplication/, change+to-, lowercase). Unknown tokens are rejected, with no fallback to the default. (consys-mqtt: add :data/{format} subtopics #253)TopicMapperreplaces the old URL rewriting of the legacy connector.org.sensorhub.impl.service.csapi.mqtt, classesCsApiMqtt*, Admin UI name "Connected Systems API Part 3 MQTT Service".consys-mqttis the same as on master. Both modules can run on one node: legacy topics under/api/, Part 3 topics under{nodeId}/.Each sub-issue was merged into this branch with
--no-ff, so the history shows one merge per sub-issue.Migration
To move a client from the legacy module, add this module and change the client topics, for example:
/api/datastreams/{dsId}/observationsbecomes{nodeId}/systems/{sysId}/datastreams/{dsId}/observations:data...?f=application/swe+csvbecomes...:data/swe-csvThe full list and steps are in the README, under "Legacy module".
Testing
TestTopicMapper: nodeId rules, all Part 3 data topic templates, format tokens, and rejected topics.Stack
This is the base of a stack:
Related: osh-core issues found during testing (for example
swe+xmltrailing read, unfiltered per-command status) are listed in the README as known limits. They also affect HTTP and will be filed against osh-core.