// persist the from endpoint as well
if (exchange.getFromEndpoint() != null) {
DefaultExchangeHolder.addProperty(pe, "CamelAggregatedFromEndpoint", exchange.getFromEndpoint().getEndpointUri());
}
exchangeCodec.encode(pe, baos);
return baos.toBuffer();
}
public Exchange unmarshallExchange(CamelContext camelContext, Buffer buffer) throws IOException {
DataByteArrayInputStream bais = new DataByteArrayInputStream(buffer);
DefaultExchangeHolder pe = exchangeCodec.decode(bais);