Patent ID: 7921427

Claim:
A method for processing messages directed to a topic, comprising: receiving a first message by a plurality of resource adapters (RA), wherein each RA of the plurality of RAs corresponds to a different application instance of a plurality of application instances, wherein each RA of the plurality of RAs corresponds to a unique identifier, wherein each RA of the plurality of RAs is configured to send a subscription request for the topic on behalf of the different application instance of the plurality of application instances, and wherein each of the plurality of application instances is an instance of a single application; based on determining that a selection flag is set to indicate that mutual exclusion logic among the plurality of RAs is enabled: calculating, by each RA of the plurality of RAs, a first selector string by performing a modulo operation of an application instance selection portion of the first message by a total count of the plurality of application instances; determining, by each RA of the plurality of RAs, whether the first selector string calculated by the RA is equal to the unique identifier corresponding to the RA; transmitting the first message, by each RA of the plurality of RAs, to an application instance corresponding to the RA when the first selector string calculated by the RA is equal to the unique identifier corresponding to the RA; and discarding the first message, by each RA of the plurality of RAs, when the first selector string calculated by the RA is not equal to the unique identifier corresponding to the RA, wherein, according to the mutual exclusion logic, a single RA of the plurality of RAs transmits the first message to the application instance corresponding to the RA and the remaining RAs of the plurality of RAs discard the first message.