TeeInputStream tis = new TeeInputStream(original.getInputStream(), os);
exchange.getMessage("in").setContent(new StreamSource(tis));
} else {
MessageUtil.enableContentRereadability(in);
SourceTransformer transformer = new SourceTransformer();
transformer.toResult(in.getContent(), new StreamResult(os));
}
}
} catch (IOException e) {
LOG.error(String.format("Error occurred while storing message %s", event.getExchange().getExchangeId()), e);
} catch (TransformerException e) {