Hi Yuuvis Team
In my Microservice I am listening to a new AMQP Queue to process new documents. This basically works great, but when I look at the body of the message the Microservice receives, there are some weird characters before the JSON body starts. Do you know why I have this weird prefix? Do you suggest using something different from RabbitListener to listen to the Queue?
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-amqp</artifactId>
</dependency>
@RabbitListener(queues = "${yuuvis.queue.name:lc.processing}")
public void processMessage(Message message) {
var mapper = new ObjectMapper();
String body = new String(message.getBody());
LOGGER.debug("Received messsage body: {}", body);
var dmsObjects = mapper.readValue(body.substring(body.indexOf("{")), YuuvisResponse.class);
...
And the Log Outputs (not exact, some characters are not visible):
Received messsage body: Sw±¿{"objects":[{"properties":{"system:objectId":{"value":"66abc037-fb73-4854-9b3a-9df92f3dcc70"},"system:baseTypeId":{"value":"system:document"}...},"contentStreams":[{"contentStreamId":"BE22CB6A-9F51-11EA-9667-CDEE767074DA","length":19378,"mimeType":"image/tif","fileName":"test.tif","digest":"DDE1502E285351CDC06DC374EA88AA462468AD4BAD01484B7516AB7DE7B0D38C","repositoryId":"s3"}]}]}
Any ideas what could be causing this?
Kind regards
Nicole