diff --git a/src/main/java/com/solace/connector/mulesoft/jcsmp/util/MessageConverter.java b/src/main/java/com/solace/connector/mulesoft/jcsmp/util/MessageConverter.java index e654590..c9f9f9f 100644 --- a/src/main/java/com/solace/connector/mulesoft/jcsmp/util/MessageConverter.java +++ b/src/main/java/com/solace/connector/mulesoft/jcsmp/util/MessageConverter.java @@ -152,6 +152,9 @@ private TypedValue convertFromBytesMessage(BytesXMLMessage msg, String c encoding = "utf-8"; } byte[] bytesPayload = msg.getBytes(); + if (msg instanceof BytesMessage) { + bytesPayload = ((BytesMessage) msg).getData(); + } if (!StringUtils.isBlank(mediaType)) dt = DataType.builder().type(String.class).mediaType(mediaType).charset(encoding).build(); else