Repository navigation
csapi-mqtt: Resource Events for systems, datastreams and control streams - #264
Merged
Merged
Conversation
This was referenced Nov 5, 2026
This was referenced Nov 6, 2026
tipatterson-dev
force-pushed
the
feature/cs-api-mqtt/254-resource-events
branch
from
November 12, 2026 02:02
a89cbe1 to
2f57e25
Compare
Base automatically changed from
feature/cs-api-mqtt/256-asyncapi-service-desc
to
master
November 12, 2026 07:27
…d control streams
alexrobin
force-pushed
the
feature/cs-api-mqtt/254-resource-events
branch
from
November 12, 2026 07:27
2f57e25 to
aecd09d
Compare
alexrobin
self-requested a review
November 12, 2026 07:27
alexrobin
approved these changes
Nov 12, 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.
Publishes CS API Part 3 Resource Events (CloudEvents 1.0 JSON) when a system, subsystem, datastream or control stream is created, updated or deleted.
Closes #254. Part of #249.
Stacked on #263 (AsyncAPI, #256) (base
feature/cs-api-mqtt/256-asyncapi-service-desc). Merge #261 and #263 first.Changes
TopicMapperaccepts Resource Event topics (no:data):{nodeId}/systems/{id}(top-level systems){nodeId}/{systemPath}/subsystems/{id}{nodeId}/{systemPath}/datastreams/{id}{nodeId}/{systemPath}/controlstreams/{id}ResourceEventPublisher:{systemPath}.typeisorg.ogc.api.csapi.{system|datastream|controlstream}.{create|update|delete}.sourceis the API root.subjectandresourceparentare the canonical HTTP URLs (for example{apiRoot}/datastreams/42), not the topic path. Each event has a newid. Nodatamember.CsApiMqttConnector:typevalues of each channel. Messages areapplication/cloudevents+json.osh-core issues found
SystemAddedEventcarries the parent's internal ID. The publisher works around it by looking the subsystem up by UID. Without this, create events went to.../subsystems/{parentId}.validTime) publishes noSystemChangedEvent, so noupdateevent is sent.PUT /datastreams/{id}fails with HTTP 500 on the in-memory state database, so datastream updates could not be tested live.These are listed as known limits in the README and AsyncAPI description, and will be filed against osh-core.
Not included
Testing
TestTopicMapper: event topic templates and rejected topics.TestResourceEventPublisher: topic, subject and parent for top-level systems, nested subsystems (create and delete), datastreams and control streams; the CloudEvent JSON; events with no Resource Event; publish and stop.TestAsyncApiHandler: event channels, media type and event types.validTime) and delete; subsystem create and delete; datastream create and delete; control stream create: each event on the right topic, with flatsubjectandresourceparent, retain falseStack