private void copyMessageAttributes(InternalMessage message) { this.exceptionPayload = message.getExceptionPayload(); message.getInboundPropertyNames().forEach(key -> { if (message.getInboundPropertyDataType(key) != null) { addInboundProperty(key, message.getInboundProperty(key), message.getInboundPropertyDataType(key)); } else { addInboundProperty(key, message.getInboundProperty(key)); } }); message.getOutboundPropertyNames().forEach(key -> { if (message.getOutboundPropertyDataType(key) != null) { addOutboundProperty(key, message.getOutboundProperty(key), message.getOutboundPropertyDataType(key)); } else { addOutboundProperty(key, message.getOutboundProperty(key)); } }); message.getInboundAttachmentNames().forEach(name -> addInboundAttachment(name, message.getInboundAttachment(name))); message.getOutboundAttachmentNames().forEach(name -> addOutboundAttachment(name, message.getOutboundAttachment(name))); }