Move DMF message converter in amqp-api#3143
Conversation
avgustinmm
commented
Jun 15, 2026
- 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
a0fc6a5 to
5f73f03
Compare
- 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>
5f73f03 to
a01c304
Compare
| @@ -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 | |||
There was a problem hiding this comment.
"...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); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
this way there is more secure and flexibility - someone may decide for using this with different purposes, or somehow change packages or whatever ..
There was a problem hiding this comment.
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