Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
We know that the splitter slices the parent message into many messages depending on our split logic. These child messages end up in the output channel. When working with Splitters, there are various things Framework does in the background:
Stamping with the same CORRELATION_ID on each of the child
messages
Setting a property SEQUENCE_SIZE to the number of messages
the parent was split into
Stamping each message with a simple SEQUENCE_NUMBER
In order to understand these properties, let’s take the earlier example of the splitter. The following is the output to the console by the receiver. It shows that it has received both messages.
Received a message:[Payload=Trade [...][Headers={sequenceNumber=1,
correlationId=18c9eee1-4795-4378-b70e-d236027d0c30, ..., sequenceSize=2}]
Received a message:[Payload=EncryptedTrade[...]][Headers={sequenceNumber=2,
correlationId=18c9eee1-4795-4378-b70e-d236027d0c30, ..., sequenceSize=2}]