template.send(message.getMessageProperties().getReplyTo(), message);
return (String) template.getMessageConverter().fromMessage(message);
}
});
String result = (String) template.convertSendAndReceive(ROUTE, (Object) "message", new MessagePostProcessor() {
@Override
public Message postProcessMessage(Message message) throws AmqpException {
try {
byte[] newBody = new String(message.getBody(), "UTF-8").toUpperCase().getBytes("UTF-8");
return new Message(newBody, message.getMessageProperties());