The main goal Claim Checkis to save the message and not worry about its size, since the message can move through several external systems. It can also be restored after a system failure.
The best example from the real world is baggage. During transfers, you only have a receipt and luggage at the end.
To achieve your goal, I suggest you use <enricher>:
<int:enricher request-channel="claimCheckInChannel">
<int:header name="claimCheck" expression="payload"/>
</int:enricher>
<claim-check-in input-channel="claimCheckInChannel" message-store="messageStore"/>
payload id.
. message , payload. org.springframework.integration.transformer.ClaimCheckInTransformer:
@Override
protected Object doTransform(Message<?> message) throws Exception {
Assert.notNull(message, "message must not be null");
Object payload = message.getPayload();
Assert.notNull(payload, "payload must not be null");
Message<?> storedMessage = this.messageStore.addMessage(message);
MessageBuilder<?> responseBuilder = MessageBuilder.withPayload(storedMessage.getHeaders().getId());
responseBuilder.copyHeaders(message.getHeaders());
return responseBuilder.build();
}