Skip to content

Move DMF message converter in amqp-api#3143

Merged
avgustinmm merged 1 commit into
eclipse-hawkbit:masterfrom
boschglobal:message_converter
Jun 15, 2026
Merged

Move DMF message converter in amqp-api#3143
avgustinmm merged 1 commit into
eclipse-hawkbit:masterfrom
boschglobal:message_converter

Conversation

@avgustinmm

Copy link
Copy Markdown
Contributor
  • move in amqp to be in single place
  • public DmfMessageConverter that could be used everywhere directly (instead of factory methods)
  • defualt amqpMessageConverter bean renamed to dmfMessageConverter
  • trusted packages configured (for dmfMessageConverter) with hawkbit.dmf.trusted-packages - default hwakbit dmf model package

@avgustinmm avgustinmm force-pushed the message_converter branch 3 times, most recently from a0fc6a5 to 5f73f03 Compare June 15, 2026 10:31
- move in amqp to be in single place
- public DmfMessageConverter that could be used everywhere directly (instead of factory methods)
- defualt amqpMessageConverter bean renamed to dmfMessageConverter
- trusted packages configured (for dmfMessageConverter) with hawkbit.dmf.trusted-packages - default hwakbit dmf model package

Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
@@ -60,7 +60,7 @@ public VHost(final ConnectionFactory connectionFactory, final AmqpProperties amq
// It is necessary to define rabbitTemplate as a Bean and set JacksonJsonMessageConverter explicitly here in order to convert only

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

"...Bean and set (JacksonJsonMessageConverter -> DmfMessageConverter).."

}

public DmfMessageConverter(final JsonMapper jsonMapper, final String... trustedPackages) {
super(jsonMapper, trustedPackages.length == 0 ? new String[] { DMF_JSON_MODEL_PACKAGE } : trustedPackages);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

shouldn't we append to and not replace the default with the configured trustedPackages :?
otherwise default is dropped and we should explicitly add "org.eclipse.hawkbit.dmf.json.model" in the trustedPackages if we want to add something in addition to the default?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

this way there is more secure and flexibility - someone may decide for using this with different purposes, or somehow change packages or whatever ..

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

for me the main use case for this would be if someone adds additional packages with events outside hawkbit and still use. the core implementation and dmf listeners (just adding custom ones that are outside hawkbit api).
i don't see it as valid option to only use listeners(dmf core) but not use default DMF APIs or have refactored them completely without refactoring just the constant

@avgustinmm avgustinmm merged commit a76e62f into eclipse-hawkbit:master Jun 15, 2026
6 checks passed
@avgustinmm avgustinmm deleted the message_converter branch June 15, 2026 10:51
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.

2 participants