groovy – RabbitMQ consumer Message – Wrong converstion to base64

I am using SAP CPI with a Groovy script, and when I post this message to the queue, it appears as Base64. However, in the logs of my middleware (SAP CPI), it is shown as a regular message. When I post it to an online webhook, it also arrives normally as JSON. Only in RabbitMQ does it arrive in Base64. The version is 4.0, and AMQP 1.0 is being used.

import com.sap.gateway.ip.core.customdev.util.Message

Message processData(Message message) { 
def fixedBody = '{"pattern":"test.evt","data":{"ID":"663","ChaveSAP":"0001","Status":"S","MensagemSAP":"Cliente 0001 created with success."}}'

message.setBody(fixedBody)


message.setHeader("Content-Type", "text/plain")
message.setHeader("CamelHttpCharacterEncoding", "UTF-8")

return message

}

Post a json

 {"pattern":"test.evt","data":{"ID":"663","ChaveSAP":"0001","Status":"S","MensagemSAP":"Cliente 0001 created with success."}}

Read more here: Source link