Skip to content

Conversation

@wirew0rm
Copy link
Member

@wirew0rm wirew0rm commented Dec 8, 2025

Follows up on a few differences that have emerged between opencmw-cpp and opencmw-java.

See the individual commits for descriptions and reasoning for the individual changes.

This will be followed up by a CI test which will verify against a binary from the opencmw-cpp repository to ensure that changes in individual repositories will stay compatible.

!fixes #223

Changes the serialisation of `MimeType` to use the verbose media type
instead of the short enum name to be in line with opencmw-java's
behaviour. Example `application/octet-stream` instead of `BINARY`.

Signed-off-by: Alexander Krimm <A.Krimm@gsi.de>
The url constructor will encode the individual parts of the url in its
constructor. If the individual components are already percent encoded,
the percent signs of the encdoded characters will themself be encoded.

For example `http:://example.com/path/file.ext?type=foo/bar` would
get the query part encoded to `type=foo%2252Fbar` instead of
`type=foo/bar`. Note that which characters will be escaped in an url
depends on the part, in other components the slash would need to be
escaped. Fortunately this is already implemented in the uri
implementation.

Signed-off-by: Alexander Krimm <A.Krimm@gsi.de>
There were some minor differences compared to the c++ implementation.
This changes the java version to:
 - use a leading slash in the subscription topic
 - terminate mds subscription topics with a `#` to break prefix matching
   which would generate multiple updates

Signed-off-by: Alexander Krimm <A.Krimm@gsi.de>
Adds normalisation to the zmq subscription topic to account for
differences in url representation.
This makes sure that all unreserved characters are escaped and all query
keyvalue pairs are sorted alphabetically, matching subscription topics
generated by opencmw-cpp.

Signed-off-by: Alexander Krimm <A.Krimm@gsi.de>
@wirew0rm wirew0rm temporarily deployed to configure coverage December 10, 2025 09:04 — with GitHub Actions Inactive
@wirew0rm wirew0rm merged commit 4ae31d7 into main Dec 10, 2025
11 of 19 checks passed
@wirew0rm wirew0rm deleted the opencmw-cpp-compat branch December 10, 2025 09:07
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.

Follow up opencmw-cpp subscription topic #-termination change

3 participants