Use message sequencing to ensure that messages are delivered to the receiving application in a particular order.
IBM® Integration Bus provides support for adding sequence numbers to messages, and for reordering messages in the message flow based on their sequence number. Messages can arrive in any order and you can use the Sequence and Resequence nodes to reorder the messages into the required sequence.
In some applications, the ability to process messages in a specific order is important for maintaining the integrity of the workflow. For example, a series of debits and credits against a bank account must be processed in the order in which they took place, and patient records that are received, processed, and forwarded must be sent on in the order in which they arrived.
When the input messages contain sequence numbers, whether they were added by the Sequence node or already defined in an integer field in the message, you can use a Resequence node to change the order of the messages in the message flow.
When messages arrive at the Resequence node, they are held in a storage queue until all previous messages in the sequence have been propagated and committed. When each message becomes the next one in the sequence, it is taken off the queue and propagated down the Out terminal. This sequence of events ensures that messages are kept in the correct order even when message processing fails.
For information about how to configure the Resequence node for these scenarios, see Handling missing messages.
You can divide messages into sequence groups, which can be processed independently, allowing multiple sequences to be processed at the same time. For more information about sequence groups and duplicate message processing, see Sequence groups.
For more information about the way in which the beginning and end of sequences are controlled, see Starting a message sequence.