Add setting to make broker not use JacksonMessageConverter (#5611)

* Add setting to make broker not use JacksonMessageConverter

* Add changelog

* Implement suggestions

---------

Co-authored-by: juan.marchionatto <juan.marchionatto@smilecdr.com>
This commit is contained in:
jmarchionatto 2024-01-26 15:06:20 -05:00 committed by GitHub
parent 949c970cfd
commit 51a6ddad3d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 19 additions and 0 deletions

View File

@ -0,0 +1,5 @@
---
type: add
issue: 5610
title: "Before, message broker always used `JacksonMessageConverter`. Added a configuration option that allows
to disable it so other converters can be configured depending on the message type."

View File

@ -26,6 +26,9 @@ public abstract class BaseChannelSettings implements IChannelSettings {
private ChannelRetryConfiguration myRetryConfigurationParameters;
// init true to match previous behaviour
private boolean myUseJacksonMessageConverter = true;
/**
* Default true. Used by IChannelNamer to decide how to qualify the channel name.
*/
@ -48,4 +51,13 @@ public abstract class BaseChannelSettings implements IChannelSettings {
public ChannelRetryConfiguration getRetryConfigurationParameters() {
return myRetryConfigurationParameters;
}
@Override
public boolean isUseJacksonMessageConverter() {
return myUseJacksonMessageConverter;
}
public void setUseJacksonMessageConverter(boolean theUseJacksonMessageConverter) {
myUseJacksonMessageConverter = theUseJacksonMessageConverter;
}
}

View File

@ -21,4 +21,6 @@ package ca.uhn.fhir.jpa.subscription.channel.api;
public interface IChannelSettings {
boolean isQualifyChannelName();
boolean isUseJacksonMessageConverter();
}