SYSTEM AND ARTICLE OF MANUFACTURE FOR DUPLICATE MESSAGE ELIMINATION DURING RECOVERY WHEN MULTIPLE THREADS ARE DELIVERING MESSAGES FROM A MESSAGE STORE TO A DESTINATION QUEUE
First Claim
1. A system, comprising:
- a message store;
a destination broker;
a monitor queue;
a destination queue;
an in-doubt list identifying messages that are in-progress of being delivered form the message store to the destination queue;
a processor;
a plurality of message threads executed by the processor processing operations to deliver messages from the message store to the destination queue, by performing operation, the operations comprising;
processing, by message threads, operations to deliver messages from a message store to a destination queue, wherein one message thread processes one message;
generating the in-doubt list identifying messages by message identifiers that are in-progress of being delivered from the message store to the destination queue by the message threads;
adding, by each of the message threads processing messages, an entry including the message identifier to a monitor queue, wherein the monitor queue indicates messages delivered to the destination queue;
sending, by the message threads, the messages to the destination queue;
generating a recovery thread in response to detecting a failure in the processing by the message threads to deliver the messages from the message store to the destination queue; and
processing, by the recovery thread, the message identifiers indicated in the in-doubt list and comparing with the message identifiers in the monitor queue to prevent duplicate delivery of messages already delivered to the destination queue by performing for each message in the in doubt list;
receiving the message identifier of a message in the in-doubt list;
determining whether the received message identifier is included in one entry in the monitor queue; and
adding one entry to the monitor queue including the recovery thread identifier and the received message identifier in response to determining that the received message identifier is not included in one entry in the monitor queue; and
reinitiating, by the recovery thread, the processing of the messages in the in-doubt list and comparing with message identifiers in the monitor queue to prevent duplicate delivery of messages to the destination queue in response to recovering from a failure that occurred while the recovery thread was processing messages indicated in the in-doubt list.
0 Assignments
0 Petitions
Accused Products
Abstract
Provided are a system and article of manufacture for duplicate message elimination during recovery when multiple threads are delivering messages from a message store to a destination queue. A plurality of message threads process operations to deliver messages from a message store to a destination queue, wherein one message thread processes one message. An in-doubt list is generated identifying messages that are in-progress of being delivered form the message store to the destination queue by the message threads. One message thread processing one message adds an entry including the message identifier and the thread identifier to a monitor queue. The message thread further adds the message to the destination queue. A recovery thread is generated in response to detecting a failure in the processing by the threads to deliver the messages from the message store to the destination queue. The recovery thread processes the messages indicated in the in-doubt list and compares with message identifiers in the monitor queue to prevent duplicate delivery of messages to the destination queue.
30 Citations
16 Claims
-
1. A system, comprising:
-
a message store; a destination broker; a monitor queue; a destination queue; an in-doubt list identifying messages that are in-progress of being delivered form the message store to the destination queue; a processor; a plurality of message threads executed by the processor processing operations to deliver messages from the message store to the destination queue, by performing operation, the operations comprising; processing, by message threads, operations to deliver messages from a message store to a destination queue, wherein one message thread processes one message; generating the in-doubt list identifying messages by message identifiers that are in-progress of being delivered from the message store to the destination queue by the message threads; adding, by each of the message threads processing messages, an entry including the message identifier to a monitor queue, wherein the monitor queue indicates messages delivered to the destination queue; sending, by the message threads, the messages to the destination queue; generating a recovery thread in response to detecting a failure in the processing by the message threads to deliver the messages from the message store to the destination queue; and processing, by the recovery thread, the message identifiers indicated in the in-doubt list and comparing with the message identifiers in the monitor queue to prevent duplicate delivery of messages already delivered to the destination queue by performing for each message in the in doubt list; receiving the message identifier of a message in the in-doubt list; determining whether the received message identifier is included in one entry in the monitor queue; and adding one entry to the monitor queue including the recovery thread identifier and the received message identifier in response to determining that the received message identifier is not included in one entry in the monitor queue; and reinitiating, by the recovery thread, the processing of the messages in the in-doubt list and comparing with message identifiers in the monitor queue to prevent duplicate delivery of messages to the destination queue in response to recovering from a failure that occurred while the recovery thread was processing messages indicated in the in-doubt list. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8)
-
-
9. An article of manufacture comprising code executed to generate message threads and a recovery thread to perform operations with respect to a message store, a monitor queue, and a destination queue, wherein the operations comprise:
-
processing, by message threads, operations to deliver messages from a message store to a destination queue, wherein one message thread processes one message; generating an in-doubt list identifying messages by message identifiers that are in-progress of being delivered from the message store to the destination queue by the message threads; adding, by each of the message threads processing messages, an entry including the message identifier to a monitor queue, wherein the monitor queue indicates messages delivered to the destination queue; sending, by the message threads, the messages to the destination queue; generating a recovery thread in response to detecting a failure in the processing by the message threads to deliver the messages from the message store to the destination queue; and processing, by the recovery thread, the message identifiers indicated in the in-doubt list and comparing with the message identifiers in the monitor queue to prevent duplicate delivery of messages already delivered to the destination queue by performing for each message in the in doubt list; receiving the message identifier of a message in the in-doubt list; determining whether the received message identifier is included in one entry in the monitor queue; and adding one entry to the monitor queue including the recovery thread identifier and the received message identifier in response to determining that the received message identifier is not included in one entry in the monitor queue; and reinitiating, by the recovery thread, the processing of the messages in the in-doubt list and comparing with message identifiers in the monitor queue to prevent duplicate delivery of messages to the destination queue in response to recovering from a failure that occurred while the recovery thread was processing messages indicated in the in-doubt list. - View Dependent Claims (10, 11, 12, 13, 14, 15, 16)
-
Specification