Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Splitters > Splitter in the Background

Splitter in the Background

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}]

  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial