主权项 |
1. A method in an information handling system for concurrent message processing, the method comprising:
receiving a first message at an input queue coupled to an intermediary, wherein the intermediary executes predetermined logic comprising one of a message broker, a mediation framework, and a message driven bean, between a sender of the first message and a receiver of the first message; allocating the first message to a first thread; starting a first transaction under which the first message is to be processed; the first thread retrieving the first message from the input queue under the first transaction; receiving a second message at the input queue; allocating the second message to a second thread, wherein the second thread is different from the first thread; starting a second transaction under which the second message is to be processed; the second thread retrieving the second message from the input queue under the second transaction; processing the first transaction and the second transaction at the intermediary in parallel, wherein a respective transaction of each of the first transaction and the second transaction is used throughout by a same thread and same logic of the intermediary; and committing the first transaction and the second transaction for release to an output queue from the intermediary in an order corresponding to an original order of the first and second messages in the input queue, using an abort policy, in which unknown transactions with outcomes that are unknown are rolled back, wherein the abort policy includes a policy comprising:
(a) in response to the roll back, one of all future and queued transactions are rolled back until a particular transaction handling an original message, which failed, is next to be committed;(b) redelivering the original message, using a message queuing system, to the intermediary which waits until the particular transaction is ready and automatically puts the particular transaction to a head of a transaction commit queue; and(c) a combination of (a) and (b) in which the intermediary waits for a predetermined period of time and, in response to the message queuing system not redelivering the original message within the predetermined period of time, rolling back all future transactions until a correct message is available. |