ARTEMIS-3780 - OpenWire, UTF8Buffer to String before setting properties to avoid exception

This commit is contained in:
AntonRoskvist 2022-04-19 12:42:09 +02:00 committed by clebertsuconic
parent c5f45ee44d
commit 32c5f9d268
1 changed files with 5 additions and 1 deletions

View File

@ -447,7 +447,11 @@ public final class OpenWireMessageConverter {
if (!props.isEmpty()) {
props.forEach((key, value) -> {
try {
coreMessage.putObjectProperty(key, value);
if (value instanceof UTF8Buffer) {
coreMessage.putObjectProperty(key, value.toString());
} else {
coreMessage.putObjectProperty(key, value);
}
} catch (ActiveMQPropertyConversionException e) {
coreMessage.putStringProperty(key, value.toString());
}