Patent ID: 8903767

Claim:
A method of sequencing asynchronous messages in a distributed system having a plurality of inbound handlers and a plurality of outbound handlers, the method comprising: receiving, by a processor of one of the inbound handlers, an incoming message having a sequence correlation value, wherein the sequence correlation value identifies a sequence associated with the incoming message; checking, by the processor, a sequence status of said sequence in a sequence storage; determining, by the processor, a message rank indicating the order of the incoming message in said sequence; comparing, by the processor, the message rank to a sequence rank defining the rank of the next message to be processed for said sequence; if the message rank is equal to the sequence rank, determining, by the processor, the message is the next message to be processed for maintaining the order of the messages in said sequence; if the message rank is not equal to the sequence rank, determining, by the processor, the message is not the next message to be processed for maintaining the order of the messages in said sequence; if the sequence status indicates that the outbound handlers are not currently processing one of the messages of said sequence and if the incoming message is determined to be the next message to be processed for said sequence, forwarding, by the processor, the incoming message to a queue storage and subsequently forwarding the incoming message to one of the outbound handlers that becomes available for processing; and if the sequence status indicates that at least one of the outbound handlers in the plurality of outbound handlers is currently processing one of the messages of said sequence; or if the queue storage already comprises one of the messages of said sequence awaiting to be processed; or if the incoming message is determined not to be the next message to be processed for said sequence, storing, by the processor, the incoming message in a memory of an overflow storage to keep for further processing.